If I say:
Answer the third/fourth/fifth one.
With one being used to avoid repeating the word question, is it grammatically correct or incorrect?
If it is grammatically correct, is the use of the word one optional here?
It's a grammatically correct imperative sentence with "the fifth" "fourth" and "third" being adjectives that modify the noun that comes after them ( one ).
-Which question do you need me to answer? -Please, answer the third one.
Technically these words ( fourth fifth etc ) can also be used as nouns. So, "answer the third" is grammatically correct as long the listener has enough context to understand what you are talking about.