Saying "can I have a ketchup?" implies you face a number of choices of which ketchup is one - but it's hard to imagine which choices those would be. Perhaps the problem is with the article, since it's perfectly possible, when the bottle is sitting on the table, to say "can I have the ketchup?" And asking a waitress or waiter "can I have some ketchup with my French fries?" is perfectly fine.
Saying "can I have a Coke?" in a restaurant works better: you have a number of drinks to choose from, and the restaurant may or may not have this one.
Can I have a Coke? You can ask your mother this when you come home from school, hot and tired, and she offers you a lemonade. You are saying: can I have this particular alternative to what you offer? But saying a Coke suggests that what you will get will be in a countable form - a glass of Coke or a can of Coke.
Can I have Coke? A little different: am I permitted, Mom, to have Coke instead of lemonade? I'll take it in whatever form you give it to me!
Can I have a glass of Coke? Sure, my dear child, drink up!
Can I have some Coke? Sure, but make sure you don't drink too much of it: you know how much sweetener Coke puts in it.
In other words, all these are possible - but the context of the question matters and that means these different responses are not randomly interchangeable.
As for using Coca Cola instead of Coke, you'd show yourself as being a little too formal, or not from around here - the way non-Californians refer to San Francisco as Frisco. Understandable, but you're clearly not native.
Say "can I order a drink?" (as long as you're of legal drinking age!). If you say "can I order drink?" you're also showing that you're not a native English speaker.