You can be fired while on medical leave. This can happen if you had been faring poorly in your job. If your employer cites your health as the reason for firing, it would have a high burden of proof when the matter is taken to court.
A company can terminate a sick employee citing his health issue if it can prove tremendous loss to its profit unless it did so. Since proving undue hardship to a tribunal is difficult, companies normally do not fire sick employees. Companies can fire employees during their sick leave citing poor job performance together with the relevant evidence.