In your case - yes, if you want to keep the narrative in past tense. The correct way to use might in a sentence referring to the past is might have + perfect - there is no Past Simple form in modern English.
Now, you don't necessarily have to use past tense here. There are two ways a narrator can typically express a character's thoughts:
- an indirect way, where they narrate, or describe a character's thoughts. This follows the narrative's tense, and it's what all your examples from Harry Potter use:
Alice opened the door and saw Bob and Eve in bed. She couldn't believe it. Was she dreaming? Did Bob really cheat on her with her sister?
- a more direct way, where the narrator quotes the character's thoughts as-is, which would typically be in present tense. As quotations, rather than parts of narrative, those will typically be typeset with quotes or - more commonly I think - italics:
Alice opened the door and saw Bob and Eve in bed. I can't believe it, she thought. Am I dreaming? Is Bob really cheating on me with my sister?
J.K. Rowling's stylistic choice is the former, and your examples are consistent with it.