Based on the verb form ("ha") you know it's a singular man, woman, or "it". :) So the translation of "Ha un bicchiere" could be "He has a cup", "She has a cup" or "It has a cup".
It doesn't matter in this case, since you were given the form in the question.
Thanks for the answer, so basically, we need context to know if it's feminine or masculine.
This feedback page is used by all kind of exercises related to these two sentences (three choices questions, oral, ES > EN or EN > ES).
The pronoun (lui) should go before the verb (ha). I didn't use "lui" in my translation but I'm pretty sure that would be right.
I'm pretty sure if "lui" is included, the interrogative syntax would be, "Ha lui un bicchiere?" This is very counterintuitive for English speakers, but this is generally how the syntax goes for romance languages.