This sounds like Garth Nix's "Old Kingdom" trilogy, specifically the first book, Sabriel (1995):
The protagonist, Sabriel, is in her final few days at her school in Ancelstierre (an alternate history of 1910s England), when she is visited by a spirit summoned by her father (the Abhorsen), who is trapped in Death and departs to rescue him. Accompanied by her father's assistant Mogget, she discovers Touchstone; and with him continues to Belisaere (the capital of the Old Kingdom). In a sacred site under the city, Sabriel briefly frees her father, who diverts the antagonist Kerrigor while the others escape.
Sabriel and Touchstone then travel to Ancelstierre to destroy Kerrigor's body, which the local soldiery (at their behest) convey to Wyverly College, Sabriel's school. Kerrigor and his undead followers besiege the college, killing many students and guardsmen; whereupon Mogget, in his true form, fights Kerrigor for the right to kill Sabriel. Kerrigor consumes Mogget and throws Sabriel onto her sword; whereupon she throws Mogget's binding ring over Kerrigor. This creates two cats: a black Kerrigor and white Mogget, which are then bound by Ranna. Sabriel then dies, but is resurrected by her ancestors to succeed her father as the Old Kingdom's protector.