Troy was definitely having a flashback. Later in the episode Creepox mentions to Vrak and Malkor that he encountered a human that refused to fight him.
Ahh, but remember your Power Rangers
history. Many times over the series, characters have battled villains in alternate dimensions, in dream realities, even inside storybooks. So Creepox could've contacted Troy on a psychic or astral plane, and by PR-verse standards, that could've been as "real" as a confrontation in the physical world.
It just seems to me that if the pilot opened with Troy having a vision of a future event, that means he has some kind of psychic ability. So if we see him zoning out in class and that leads into a confrontation with Creepox, I think it's reasonable to take that as a second instance of his psi powers rather than just some random bit of bad editing. True, there's a lot about this show that's ineptly handled, but I'm holding out hope that this actually means something.