James, however, was not a Prefect. Remus Lupin was the Prefect for Gryffindor during those years. How James became Head Boy is a bit of a mystery. Part of this mystery may have been explained by Hermione's statement in HBP6 that being Quidditch Captain "gives [Harry] equal status with prefects". Perhaps the Head Boy and Girl are chosen from the Prefects and the Captains of Quidditch.
Was Lily a Prefect? Good question.
There is nothing that specifically says that Lily was a Prefect. But from 1997 through 2005, there WAS canon proof, and that's when this timeline entry was originally written.
Back then, all the canon we had available told us that the Head Boy and Girl were chosen from the Prefects. So since Lily was Head Girl, according to the canon available at that time, she would have had to have been a Prefect.
However, in book five we learned that James was not made a Prefect, while all the way back in book one, we learned that he had been made Head Boy. This was an inconsistency and fans all noticed it immediately and wrote about it.
Rowling addressed this inconsistency by adding this in chapter 6 of book six:
The day after this rather gloomy birthday tea, their letters and booklists arrived from Hogwarts. Harry's included a surprise: he had been made Quidditch Captain.
"That gives you equal status with prefects!" cried Hermione happily. "You can use our special bathroom now and everything!" (HBP6
She was retconning to make it possible for James to be made Head Boy because he was Captain of Quidditch. Lily wasn't Captain of Quidditch, of course, so the fact that she was Head Girl still makes it ALMOST certain that she was a Prefect -- but it's not 100% certain because that new canon from 2005 suggested that there might be other things which qualify someone to be a Head Boy or Girl. No other position at Hogwarts seems like a likely possibility, but that option is now on the table.
So there isn't specific canon proof any more, but there is "historical" proof, if you will. It's seems very likely that JKR intended for only Prefects to become Head Boy and Girl until she found it necessary to revise canon to match later books. In other words, what we're seeing here is a lovely example of how Potter fandom's interaction with Rowling helped shape the details of the books. Another example is where Rowling wrote the pronunciation of Hermione's name into Goblet of Fire because fans were constantly writing and asking her. Sites like the Lexicon had pronunciation keys for readers because we received those same sorts of questions. (No, you don't pronounce the T at the end of Voldemort ...)
The relatively few inconsistencies in the books are truly a testament to Rowling's skill as a writer and the way she could keep the entire saga so clearly in her head as she wrote over many years and almost a million words. She and the editorial teams at Scholastic and Bloomsbury did use the Lexicon as a reference back then (they didn't have their own internal canon 'bible' in those days, they just used the Lexicon), but mostly she could rely on her own thorough, intimate knowledge of her world.
It's worth including this quote from the MuggleNet/Leaky Cauldron interview:
"... once the book is published I rarely re-read. A funny thing is when I do pick up a book to check a fact which I obviously do a lot, if I start reading then I do get kind of sucked in myself and I may read several pages and then I put it away and go back to what I’m doing ... Therefore there are thousands of fans who know the books much better than I do ..." (TLC
That was and still is very true. It's been a privilege to be part of that knowledgeable fan base for the past two decades. --SVA