When anyone is used as an indefinite pronoun to mean “anybody”, it is written as one word: Anyone could tell you the answer. Do you know anyone else who could help?
Otherwise, it is written as two words: Any one of us could have scored a high mark. A maximum of six people are allowed in this lift [elevator] at any one time.
Anything and anywhere are written as one word; any time as two words.
Source: The Penguin Wordmaster Dictionary, Martin Manser and Nigel Turton, eds., 1987.
It all makes intuitive sense to me, as a native English speaker. But you can understand why someone for whom English is a second language would be completely befuddled — as so often with this magnificent, exasperating tongue of ours!