I’m in Ireland so not sure of the UK rules but from looking at the Irish website, you don’t have to notify them of medication. Just of an illness. It does say that a driver must “adhere to prescribed medical treatment and monitor and manage their condition(s) and any adaptations with ongoing consideration of their fitness to drive.”
So from my reading of it a person doesn’t have to notify that they are on certain medications. But if the medication interferes with their ability to drive or it’s recommended that they don’t drive while on these meds, then it is their responsibility to not drive.