The article said that the problem was based in formal logic and appeared on a "maths test." That means it isn't ambiguous question about the English language.
Yes. It isn’t ambiguous and is entirely solvable using old school formal logic of the “All Cretans are liars” sort.
If the liar owns no hats the statement “All my hats are green” would be true. Under the parameters of the question it must be a lie and therefore cannot be true. So the liar owns at least one hat which is not green. They may own additional hats which can be of any colour.
People who are saying “if they are a liar they might not even be talking about hats” are somewhat missing the point:
1) Whether or not they are talking about hats they have made a statement about hats and under the “rules of the game” of formal logic it must be untrue because we are given they are a liar. That’s enough to answer the question.
2) The “rules of the game” are about predicates and properties and inference. The language is plenty precise enough to convey both the question and to deduce the solution.
No that doesn't mean anything. Tests and books can be wrong.