While, quite rightly, employers must make 'reasonable adjustments' to accommodate employees with disabilities, that doesn't mean that they can't dismiss them if it's no longer practical to keep them on their books.
Most employers will start to question whether they ought to be keeping someone on once their absence rate reaches two or three percent. Yours is around 24% so, given all the problems that having someone off work can cause to others in their workplace, it's inevitable that your employer will be thinking about whether it's really practical to keep you on. All that seems to have happened now is that the employer's position has been made entirely clear to you.
You asked "can they sack me while I’m off sick?". The answer to that is definitely 'yes'. It's not at all unusual for someone who's been off work for an extended period to find that their employer finally gives up on any hope of ever having them back to work on a regular basis again.
Your best source of detailed information is probably the Acas helpline:
https://www.acas.org.uk/contact
(Several ABers have indicated that it can take quite some time to get through on that number but that it's definitely worth the wait).