A form of cancer has been detected after King Charles III was admitted for treatment of an enlarged prostate.