And besides, it's just not some random people in the call centre - Home Office's own website said that you only reside in the UK legally if you are exercising your free movement rights - I mean, that clearly reads to me as "if you don't, you are here illegally". It can't work both ways.
No, you need to meet additional criteria. This is explicit in EU law [1] (and very well covered online), so I'm puzzled as to the advice you received.
Since you were looking for a legal references regarding students, note that [1] is also explicit that students should have "comprehensive sickness insurance cover" (the dispute here is whether access to NHS qualifies. UK government argues that it does not).
[1] Article 7 of https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A...
But if you do not have health insurance this does not count towards gaining permanent residence (and thus citizenship thereafter).
If you need legal advice you should talk to a solicitor specialised in immigration law, not to a random person in a call centre.