Firstly, I believe you are wrong in assuming that 'the' cannot be used. You refer to a context. There is no context. There is an isolated sentence (I assume from an exam page).
From the point of view of grammar, you could use either the indefinite or definite article in either position in that question. The rule about using "the" if something is identified doesn't have any bearing on isolated sentences like "I want an/the apple". They are both grammatical.