Is it ok to use menstrual relief pills for other

I am at school with a bad tooth ache and the nurse is not allowed to give medicine unless it is approved and prescribed to you... all I have is some period relief pills for an emergency but would those help the pain ? I might have put this in the wrong group idk