This is confirmed in the book when Harry first encounters him in the Chamber:
> "You're sixteen," said Harry. "You must be sixteen, you're in your sixth year."
While Riddle is older than the other students, he was still technically a student at Hogwarts. He had been attending school for six years, just like everyone else.