I agree. Get him into the vet for lab work. NSAID's can cause digestive, liver and kidney problems when used long term. Usually its recommended that blood work be done before starting these meds, and then at least every six months thereafter. Due to the age of your dog, and possibly the dosage needed due to the acl tear the meds could be affecting him.
It could also be an unrelated stomach virus, but I would take him in either way.
At 13 every health issues is more problematic, The only things that seem to work are regular vet checks, manage diet and exercise to control weight and exposure to physical risk.
Encourage drinking water, not sure how to do that other than making water available and easy to reach.
If this has been going on this long and he is getting worse, add the age factor to that, he really should be seen by the Vet and at least some lab work done.