Yes, that's perfectly grammatical since the context is clear.
When you encounter the question of countable versus uncountable, it's useful to think in terms of the substance (uncountable) versus a specific variety or quantity of the substance (countable).
Consider:
Tea is good for you (uncountable - referring to the substance)
A tea in the morning is a great way to start your day (countable - referring to a serving/quantity of the substance i.e. a (cup of) tea
This is quite common for food/drinks. (Beer, wine, steak - there are a lot)
Remember, where the context is clear (i.e. ordering food/drink), the countable form without the specific serving vessel or quantity is often used:
Two beers, please
A water with ice, please