The fact that he canceled engagements only a day in advance (according to the palace, the announcement was made on Wednesday because he needed to cancel engagements on Thursday and Friday) would seem to suggest he had sudden and significant symptoms.
https://www.bbc.co.uk/news/uk-68012498
His choice to specify his medical condition (in hopes of reminding members of the public to get tested for it, which it surely will) implies there is not an unbreakable royal rule against revealing medical conditions but is up to the discretion of individual royals.