If we pulled out of the EU as far as I'm aware franchising would still continue but without the red tape, on the plus side it'd force the British Govenment to buy British.
This is why we need Derby Works to keep open, to help keep the jobs there.
The franchising system in the UK is one that has been devised and is (mis)managed by the British government - an organisation that is pretty good at creating red tape all by itself - and exporting it. Where do you think the legendary bureaucracy that prevails in India originated?
France, supposedly the arch-proponent of EU-ness, has zero rail passenger franchising and keeps magically putting off its introduction again and again.
Why would it force the British government to buy British? Apart from the daft IEP deal, the Government doesn't 'buy' trains and that isn't going to change. Never mind that there isn't the production line capacity in the UK, even with Newton Aycliffe opening, to meet current demand for new stock.
This is in theory:
If Brexit does happen then EU Directives would not apply to us including Directive 91/440 and subsequent EU Rail legislation. This could then lead to a possible Repeal of the 1993 and other Acts including the 2005 Act
Unfortunately for the theory, as noted above, EU directives are passed into UK law by our Parliament. Repeal those Acts and we would be a bit short of laws on a whole lot of things, not just railways.
Should Brexit happen, there will be rather more pressing concerns to tackle than laws on rail franchising - and selling off and franchising out anything and everything is, of course, a pet policy approach of the Tories anyway, so nothing would change.
And should we leave, but wish to continue to have access to the European Single Market in a similar manner to Norway and Switzerland - and that assumes the remaining EU states would agree - then we most certainly will have to continue to abide by existing EU directives and continue to pass our own legislation to enact new directives to comply with the rules of the single market.