This is a phony story as you present it. It was NOT the HS which told the student to remove the flag, it was a security officer who according to the school had no authority to do what she did.
The Principal said there is NO rule against flying the flag and that the security officer was 100% wrong.
Is the student again allowed to fly the flags?