When you first get to Ebisugaoka Middle School, the stairwell is locked away — and it's up to Hinako to unlock it. Thankfully ...
You can purify the sword at the purifying shrine, which is just around the corner from the final jizo statue. You also don't have to worry about completing the ending with the unpurified sword first, ...