I just recently answered a question related to how much water was filled in a glass. I answered "two thirds" but the answer was wrong because in the key answer book it was "two-thirds". Please tell me if my answer is wrong and why?
Typically speaking, there is no significant difference between "two thirds" and "two-thirds". Which one to use is mostly a matter of style and is not important when determining reader or listener comprehension.
In the case of something like an IELTS exam, I would expect both "two thirds" and "two-thirds" to be accepted as correct answers. If I were marked wrong because of the missing hyphen I would bring it to the attention of my teachers and ask for a correction.
To be safe, however, you should include the hyphen since it is less likely to be interpreted incorrectly. "Two-thirds" is slightly more correct and anyone scoring a fill-in-the-blank section of a comprehension test is slightly more likely to mark it as a correct answer.
If you are curious about a technical correctness, than Fractions as phrasal (compound) adjectives discusses the issue in slightly more detail.
As always, with anything related to answers to tests and exams, you should also consult your teachers or professors. They are likely to provide help that is more accurate for any given context.