It depends upon the treatment he had.
He might still have a prostate and does not want to risk getting you pregnant.
If he had a radical prostatectomy he does not need to worry about that. He can orgasm without making a mess.
If he didn’t get a vasectomy years before then there is a chance he is still carrying sperm.
There are different treatments for prostate cancer. The prostatectomy is the only one that guarantees he is 100% safe.
Radiation, seeds, hormone, chemo,... all have a chance of unintended pregnancy.
I happened to have a vasectomy about 25 years before my prostatectomy. That was a bit unfair.