Just catching up on some Giro d'Italia coverage today and of course after Contador's crash at the end of stage 6 there's been a lot of talk about what treatments he's receiving to continue riding with his dislocated shoulder. According to Matt Stephens, back when he rode the Giro in 2000 you could get cortisone (steroid) injections which would completely mask joint pain, but that's not allowed anymore.
Contador has to continue with only physical therapy, massage, bandaging, and paracetamol (acetaminophen aka Tylenol) which is a pretty weak anti-inflammitory. He mentioned something about "special dispensation" for use of other medications which I think is for riders with chronic conditions such as diabetes but doesn't apply here.
Just doing some more looking around, I didn't know NSAID stood for Non-Steroidal Anti-Inflammatory Drug. This includes acetaminophen, ibuprofen, aspirin, and naproxen. These all seem to be allowed, but of course they don't fix or heal anything, just mask the pain, so you could be making an injury worse by continuing to train or race. They can also affect your GI tract and of course long term use has other side effects. On the other hand, if taking something means you can get a good night's sleep, that can go a long way to helping the recovery process.
According to one source I read, "For some triathletes, popping ibuprofen or other NSAIDs is as common as brushing your teeth" which seems like overuse to me. YMMV.