You can apply and you can start working while on notice, nothing illegal about it and all fine.
However, it depends on whether you need references or not, and whether you need to mention you are off on long term sick.
I have done this in the past with no problems. (Will slightly change details in order not to be identified but all true).
I worked in a school. During the long school summer holidays I began some voluntary work in an entirely different field, it helped reduce my stress, gave me new interests etc.
By the end of the summer holidays I felt I couldn't face going back to main job so was signed off work, continued to be signed off during the autumn. Applied for a local job which I got, short-term contract but in the same field as I'd been doing voluntary work so gave my voluntary job as reference.
Did short-term contract, liked it. Gave in my resignation to the school but that required another 3 months notice. Continued to be signed off by doctor, my sickness pay ran out, moved onto SSP and finally that ran out too.
During this time another different but better (and part time) role came up locally, applied and got it. This time I just gave the referees as the voluntary place and the short-term contract so didn't need to involve the school at all. All was fine, they assumed I'd left my school job a while back, I just said I'd been doing voluntary work and wanted something different.
Started that new job while my school notice was still running out.
You don't get a P45 as you haven't yet left your original job, that doesn't matter, your workplace will get you to fill in another form (P46?) instead. You just tick the box to say you have another income source, by the time you've secured a new job no-one queries it.
It means the tax office will know all your workplaces(s) and sources of income but they don't tell workplaces where else you are signed up to. It does mean your tax code won't be sorted out until you've left the first job so you will be taxed at BR rate until that's sorted, but in my case it was a small price to pay to get out. If you overpay tax it will get refunded when it's all sorted out.
In the UK it is not illegal to work at more than one workplace, nor is it illegal (in the UK) to be off sick in one job but be perfectly fit to work in another, so long as you are physically/mentally fit to work at that job.