It would be very very unusual for this to be the presenting symptom of advanced prostate cancer at 40. Does he have any male relatives affected at a young age? Or strong family history of breast cancer in female relatives at a young age? These would make it a little more likely but still rare
Did his GP do a rectal exam (to feel the prostate) and talk about checking a PSA blood test (prostate blood test)? If his prostate feels soft and small, and his PSA is low (prob under 2 at his age) then you can be as reassured as stats allow that its not prostate cancer. Other things like a waterworks infection can temporarily put the PSA blood test up so whilst a low psa +normal feeling prostate usually means no cancer, a high psa means further investigations and tests, it doesn't make a diagnosis of prostate cancer if you see what I mean.
Steroid cream is nothing to do with anything, don't worry about it.
What I would be most worried about is the incontinence - this can sometimes mean the bladder is chronically full, with only dribbles escaping. If you gently feel his tummy between belly button + pubic bone does he feel "pregnant"? Hopefully his gp did that too but its easier to feel a full bladder in skinny people rather than sturdier folk...
As someone else mentioned, it could be a stricture - a scar in the urethra or waterpipe causing a restriction in the flow -very common, non-sinister but does need a urologist to diagnose + treat.
Things to do:
If he's ever passed any blood in his pee, he should make sure his gp knows -that would merit seeing a urologist in 2 weeks for a camera inspection
If he drinks lots of caffeinated drinks, cut down
Buy a cheapo plastic measuring jug. Buy a notebook. Get him to choose some day like the weekend when he's at home and every time he pees in a 24hr period use the jug to measure it then tip it into the toilet. Its really useful if he can note down what he drinks and when on one side of a double page, on the other side what he pees and when. Its called a bladder diary. 2 or 3 days (not consecutively if it doesn't suit) is really helpful but he doesn't really need to do it all the time!
If he finds he can't pee at all - get on to nhs 24, get help - usually means trip to a+e to see a urologist
If he wasn't examined at the gp's, get him back to see someone else asap!
Hope that helps, when I'm not being a mummy I do urology