I'm not an accountant, but the advice I received from mine was that the costs involved in GETTING your qualification were not tax deductible but the ones in MAINTAINING or RENEWING it were.
If you have more than one source of income from flying (i.e. you don't just instruct for one flying school) then the problems of IR35 should not arise.
I'm sure better-qualified people than me will give you fuller answers.