It is not compulsory to stop your work in case of cancer. On the contrary, it is demonstrated that continuing work allows you to keep a social ink associated with a better experience of the illness when your physical state allows.
If you decide to continue working, the work role can be arranged according to your new limits: part-time therapy, resorting to the ease of remote working, change of role, etc. These rules also apply in case of returning to work after being off sick.
In case of heavy treatment, physical and/or psychological impact of the illness, stopping work can be preferable, but this is not an irrevocable decision and this can be adapted over time in line with your oncologist and according to your wishes.