Once these things a ruled out, consider if your friend may be deliberately urinating in the house to get your attention. This would not be the case if your cat or dog is just dribbling a bit, but if there are other behavioral changes, you may want to contact an animal communicator to understand the issue causing the behavior. Once acute physical causes or behavior issues have been ruled out, you can probably assume that the cause is physical in nature due to the age of the animal. Older female dogs sometimes leak due to having been spayed. Males can have troubles due to an enlarged prostate.
Cats can have bladder control problems due to repeat infections in the past and catheterizations.
Another consideration is if the animal is confused or has trouble getting to the litterbox or outdoors in time. More boxes in the house and keeping a close eye on your dog's need to go out can help. To support an older animal's system it is vital to have them on a natural diet. Synthetic additions of preservatives or flavor enhancers in commercial foods may be contributing to an irritated urinary system. Allergies to the additives may also be part of the problem.