According to the Harry Potter book series, was being a former Hogwarts student a prerequisite for a Witch or a Wizard to become a Professor at Hogwarts?
I would say no because Hogwarts is not a requirement for any witch or wizard. Some families homeschool (Mrs. Weasley taught the Weasley kids at home until they went to Hogwarts) and some send their kids to other schools (Lucius Malfoy wanted to send Draco to Durmstrang, but Narcissa objected to Draco being so far away from home).
It was only under Voldemort's reign during Deathly Hallows that Hogwarts was compulsory, but then again only for purebloods. Muggleborns were excluded from Hogwarts during that time.
So, again, no -- I don't think Hogwarts teachers have to have attended Hogwarts in order to teach.
Did not attend:
Possibly did not attend Hogwarts:
- Trelawney (Dumbledore did not seem familiar with Trelawney when he recounted his first meeting with her at the Hog's Head)
Former Hogwarts students who became teachers at Hogwarts:
- Barty Crouch Jr/Moody
- the Carrows
- Charity Burbage (Muggle Studies)
- Sinistra (Astronomy)
- Vector (Arithmancy)
- Grubbly-Plank (COMC)
- Binns (History of Magic)
If I've forgotten anyone else, leave a comment and I'll edit.