You, my friend are incorrect...and have swallowed hook, line and sinker an urban legend. The President said it correctly
From what I understand, everywhere else in Germany a berliner IS a jelly donut. So while he may have been correct in Berlin the rest of the country heard "I am a jelly donut"
(But then I could be wrong. It's happend before. I think)
You've right. It's roughly the equivalent of saying "I'm a Hamburger" rather than "I'm of Hamburg".
He used the article (ein); if he had said "Ich bin Berliner," it would have been correct. However, everybody knew perfectly well what he meant, and Germans (particularly Berliners) loved it, error and all.
I don't speak the language well enough to be in judgement, but I suggest that you google the phrase and review what folks who apparently know say......that's where I got my information...
Lots of places in Germany have food items named after them, depending on where the dish originated. For instance, a Hamburger is both a resident of Hamburg AND something that White Castle serves.