I think in this case scenario, the GM probably should have said:
"You agreed not to cast the spell at the start of the adventure, I am not allowing you to do that."
If it was agreed at the start I guess it's just as much of a rule as non-PVP. Consider it signing a contract at the start of the adventure. I like a character with conviction and so I can't really hold it against the Inquisitor for following through on their character's beliefs but if the GM had just enforced the agreement at the start then things would not necessarily have escalated so.
Yes the Necromancer might have been a bit annoyed but...well he shouldn't have agreed to it at the start then.