...I certainly think the administrator should be able to confiscate any pills students are observed with; I'm not afraid of ibuprofen, and if the student refuses, the resolution should be to contact the parents or police, not to strip search them, but they do actually need to have some ability to actually run their building, which means expecting certain behavior from students and the ability to get rid of students who comply (that sounds all fascist, but that isn't the way I mean it, I just mean that disruptive students shouldn't get to piss all over the other kids; odd story, that actually happened at my junior high. I'm glad I wasn't involved.).
Have you considered that the student may have NEEDED the ibuprofen? Teenage females are more prone than the general population to be afflicted with migraines. (Oh, the joys of being a female!) If she is prone to migraine, she would have legitimate cause to carry ibuprofen. Doctors who deal in headache treatment will tell patients that if they do not have access to Rx drugs, and they feel a migraine coming on, to take something, be it ibuprofen, naproxin sodium, aspirin, caffeine or acetaminophen to keep the migraine from getting too far out of control.
Where I went to school, if someone said that they had a headache, a dozen girls were reaching in their bags and offering up cures. Taking care of people is, to an extent, a natural feminine trait! Now, they want to string up the girls who are actually out to help people. Yup, zero tolerance for being a helpful human being, and helping someone stop their suffering. Oy!