This is from Debbie Ducommun's Rat Health Care booklet:

Treating Pain and Inflammation:

"For pain you can give rats aspirin, ibuprofen, or acetaminophen. Choosing the correct analgesic should be based on the type of pain and the rat's general state of health. Of these only acetaminophen (Tylenol) should be used after surgery, since it's the only one that doesn't promote bleeding. However, aspirin and ibuprofen are generally more effective anti-inflammatories. Your vet has other injectable analgesics, such as butorphenol which can be injected subcutaneously at a dose of .012 mg/lb.

Acetaminophen--As effective as aspirin, except not effective in rheumatoid arthritis. May have anti-inflammatory effects in cases of injury. Overdoses can damage the liver. Dose: 90-140 mg/lb. every 6 hours. The dose should be chosen according to the severity of the pain and the possible length of use. Choose lower doses for repeated use.

Aspirin--Effective in most types of pain. A single dose destroys platelets, which normally live for 7 days, and so prolongs bleeding time. Can cause asthma in aspirin-sensitive individuals. Multiple doses can damage the stomach and cause other toxic effects. Aspirin also interferes with ovulation in female rats. Dose: 45-205 mg/lb. every 4-6 hours. As above, choose the dose based on the type of pain and length of use.

Ibuprofen--More effective pain killer than aspirin or acetaminophen. Also prolongs bleeding, but only while it is in the system. Chronic use can cause bleeding, ulceration, and perforation of the stomach. Ibuprofen causes fluid retention and decreased blood flow to the kidneys, so is more risky to use in the elderly, or if the patient has heart or kidney disease, or is on diuretics. Dose: 15-60 mg/lb. ever 4-6 hours. Lower doses are for analgesia, higher for anti-inflammatory effect."

"Ferrets, Rabbits & Rodents: Clinical Medicine and Surgery" by Hillyer and Quesenberry also has dosages for several painkillers.

Aspirin 100 mg/kg q4h; PO
Codeine 60 mg/kg q4h; SC

Finally, Butorphanol is an analgesic and sedative, especially useful after surgery. The dose is 0.18-10 mg/lb SQ or 1 mg/lb orally every 4-6 hours. Debbie recommends .25 to 1 mg though unless there is surgery being performed.

You may have to learn how to give a subcutaneous injection (it's easy in the loose skin of the neck). The best needles I've found are the insulin needles B-D Ultra-Fine II Short Needle. It's a 30 gauge 5/16" needle.