Well, it could be a dark wizard in disguise. This dark wizard could be using Hermione as a pawn in a bigger plan. By making it seem like she's sabotaging homework, he hopes to create chaos in Hogwarts. He might be secretly influencing Hermione's actions or directly interfering with the homework to make it look like she's at fault. Another option is a disgruntled house - elf who is tired of seeing Hermione always doing so much work and decides to play a trick on her by making it seem like she's sabotaging the students' homework.
The antagonist could be a magical creature that has infiltrated Hogwarts. Maybe it's a mischievous imp that targets Hermione because it senses her strong magical aura. The imp then causes the homework sabotage and tries to make it look like Hermione is responsible. Or it could be an older student who feels threatened by Hermione's academic success and decides to set her up by making it appear she's sabotaging homework.