Did you notice this on the floor or in the litter box?
Is it possible your cat vomited? White and foamy is much more characteristic of vomit.
I would imagine that this is just bubbles or some sort of foam that may form due to the litter.
I know of NO condition in cats that causes white foamy urine.
If a male cat has urinary problems, he will squat often, have a poor urine stream, produce litter urine, and have bloody urine.
I would not be concerned about this - I think it is just due to the litter.