Armando Dippet was the headmaster of Hogwarts when Tom Riddle was attended the school, at least from when Riddle was in his fifth year until after he graduated. When Dumbledore is teaching Harry about Voldemort's past in The Half-Blood Prince, he states that Dippet denied Riddle a job as a teacher because he believed he was too young.
"Hardly anyone knew of it at the time — I was one of the few in whom the then headmaster confided — but Voldemort first approached Professor Dippet and asked whether he could remain at Hogwarts as a teacher."
...
"But he didn't get the job, sir?"
"No, he did not. Professor Dippet told him that he was too young at eighteen, but invited him to reapply in a few years, if he still wished to teach."
- The Half-Blood Prince Chapter 20 (Lord Voldemort's Request)
However, later in the book Harry is in Slughorn's memory of Tom Riddle. When talking about Horcruxes, Slughorn warns Riddle that Dumbledore is strict about the subject of horcruxes.
"Of course," he muttered, "this is all hypothetical, what we're discussing, isn't it? All academic . . ."
"Yes, sir, of course," said Riddle quickly.
"But all the same, Tom . . . keep it quiet, what I've told — that's to say what we've discussed. People wouldn't like to think we've been chatting about Horcruxes. It's a banned subject at Hogwarts, you know. . . . Dumbledore's particularly fierce about it. ..."
- The Half-Blood Prince Chapter 23 (Horcruxes)
Dippet is clearly headmaster at the time of this memory. In that case, why would Slughorn say that Dumbledore is particularly fierce about it, right after saying how it's banned? That seems to imply that Dumbledore is in charge of the banning and subsequent "punishment" if the rule is broken. Unless Dumbledore was deputy headmaster, but it still seems odd that he would say Dumbledore instead of Dippet.