There is an old medical diagnostics maxim: If you hear hoof beats, it’s probably horses, not zebras. I would rule out UTI first. Catch some of his urine in a glass. If it’s cloudy, he probably has a UTI. A broad spectrum antibiotic will do the trick, but this would have to be provided by a vet.
Next I would suspect diabetes. This would also cause the urine to be cloudy—with albumin. There is a test strip for that, just dip it in the urine. To confirm, you can give the dog a simple blood test done with an AccuCheck machine and a test strip. I don’t know what the normal serum glucose values of a canine are, but it’s probably listed on the net somewhere. Use a friend’s AccuCheck machine. Give ‘em a few bucks for the test strip—they can be expensive. For a few bucks extra, you can buy special chow that might control the diabetes, if it’s not too severe. You’ll have to monitor him every few days for a couple of weeks with further serum glucose checks to see if diet alone works.
If you’ve ruled those two things out, it’s probably that he is getting old and his bladder has shrunk to the size of a peanut—a common problem. In that case, the dog would benefit from the canine equivalent of a drug used on humans with the same problem—FloMax (Tamsulosin). Don’t give human Rxs to animals as you never know how they will react. Aspirin kills cats; I can only imagine what FloMax could do to a canine. Get professional advice at this point. If you’ve ruled all the above out and you believe the dog is actually in discomfort, take him to a vet. If incontinence is a problem, there is an Rx for that, too. Do it yourself is cool, but eventually you’ll have to go to a vet for the cure. And for the love of Dog, it’s probably just horses.