Yes. If your employer believes you can no longer do your job on the grounds of capability, they can fire you. Before taking action they should look for ways to support you and give you a reasonable time to recover from your illness.