So, you meant Bagman didn't refuse to give the money back. But according to the context, they didn't get their money back at all. Your paraphrase ""Don't tell me he didn't refuse!"" sounds like "he did refuse", does it? Then Ron should reply: "Surely he did refuse!" Does it make sense?
– danJan 1 at 10:45

@dan You're right, that was the paraphrase I got wrong. As with double negatives, this can be tricky. (It's actually trickier than the right in one expression.)
– Jason BassfordJan 1 at 11:00

I'm thinking maybe Fred is being sarcastic by “Right in one,” and he actually wanted to make a reverse assertion instead.
– danJan 1 at 13:15

1

@dan No, Fred isn't being sarcastic. Hermione's statement is not literal. "He didn't ____!" is a common type of exclamation used to express a sudden realization that someone did something utterly unexpected. It expresses incredulity. Hermione's meaning is actually closer to "I just had a realization! I did not expect him to refuse. But he did refuse, didn't he?"
– trlklyJan 1 at 20:04

1

@dan Using negation to express incredulity is quite common in English. In fact, I had difficulty rewriting Hermione's dialog to convey her meaning without using this feature. You may want to ask a separate question about that to learn more, as it will help your English comprehension immensely.
– trlklyJan 1 at 20:11

The exclamation point alone might make you think that Hermione was making an emphatic assertion. However, when characters "gasp" their words (if they're not struggling for breath because of some physical ordeal) it signals that they're in shock and disbelief.

Hermione is shocked to find that anyone could be as nasty and dastardly as Bagman had been.

Another colloquial variant would be:

No way he refused!

A more refined variant, something that could be said in a drawing room, would be

Can “Right in one,” be sarcastic? Hermione didn't get it right actually.
– danJan 1 at 13:57

1

@dan: It's not impossible to find a context for a sarcastic RIght in one! But it would have to be followed up with Not! or some other admission from the speaker that it had been meant sarcastically. Here, however, that reading is not possible. Ron says "But that was all your savings!" and George replies "Tell me about it" which means "Don't I know!" that is, "I'm painfully aware of that fact".
– TᴚoɯɐuoJan 1 at 14:01