Hello Spice,
My understanding of the CAA's view is that this is no problem providing the medication is well tolerated.
There is of course the matter of the underlying condition. That needs to be 1. not something which is incompatible with safe flying and 2. well controlled.
HTH
FD