Even aspirin can cause gastric bleeding. My vet used to recommend it for his arthritic dog patients until one strange case happened. After the first dose, the dog became sick and started vomiting blood, and by the time the owners got him back to the vet the dog died. The aspirin literally ate a hole right through the stomach.
I've used tylenol on my dogs (per vet instructions) in the past for early onset hip dysplasia, but found it not all that effective. I couldn't begin to remember the correct dosage and daily limits though.
As ginger said, if a dog needs a painkiller, he needs a vet first to diagnose the problem and correctly treat it. So far in my experience, Deramax has been the best non-steroidal anti-inflammatory for pain in dogs - particularly for arthritis pain. Rimadyl is a close second and fairly cheap since it's been on the market for years.
What kind of pain is your dog experiencing?
Yes, absolutely! Do NOT give your dog Ibuprofen.
I reckon if a dog needs a painkiller, that dog really needs a vet.....
Do NOT give ibuprofen to your dog, it is highly toxic to them. If you want to try an over the counter medication to your dog, you can try aspirin, but in low doses. Here's a website with a pretty good break down on what you should and shouldn't give your dog as far as pain killers go.
http://www.dogchannel.com/dog-information/dog-vet-geller-dvm/article_18550.aspx