Your problem is that you can't perm your hair because you are weak after major surgery. If you dye your hair, it will do unexpected harm to your body.
Guiding opinions:
If you have a perm, it will easily lead to a serious allergic reaction. It is not easy to be cured, but it is safer to wait until one or two years after physical recovery.