9.51 relates to arrest/search. 9.21 is more general... I think.P.C. 9.21
(d) The justification afforded by this section is available if the actor
reasonably believes:
(1) the court or governmental tribunal has jurisdiction or the process
is lawful, even though the court or governmental tribunal lacks jurisdiction
or the process is unlawful; or
(2) his conduct is required or authorized to assist a public servant
in the performance of his official duty, even though the servant exceeds
his lawful authority.
All that aside.... you gotta sleep at night. The variables are endless. Are you trotting off to your car or is the officer giving you his backup? Is this an adult stranger or a student that is perpetrating the act? Will you keep your job after you make your decision? You have to deal with those variables for you, and make sure you and your beloved (wife, kiddos, etc.) are in-the-know.
Once that's done, you'd sleep better in a jail-cell with no job having saved lives, than you would after being promoted to principle for "doing the right thing" (i.e. nothing) Or, if you decide that it's not your fight, that's okay too. Just make the decision. A decision in the moment is THE biggest thing you have to avoid...IMHO
I'd also avoid any sort of "official" agreement without the school's written endorsement. If you decide you are up to help the guy, just let him know that you aren't afraid to pull a trigger to save lives. The logistics, unfortunately, will HAVE to be decided upon at the time. (i.e. BG between you and the parking lot=no run to car for gun)
Chad