That's true but of course since nationalisation there has effectively been one period of Labour government if you count Blair/Brown administrations as being the same thing. Blair wasn't even a luke warm Socialist and he wasn't known for keeping his promises. My point is that >now< if Corbyn or anyone else claims they can nationalise the railways when we are in the EU then they are lying.
I suppose it depends on what we mean by 'nationalisation'. EU law does not prohibit state ownership of the 'national' operator - it prohibits an absolute state monopoly on the provision of rail services. The Portuguese rail network being a case in point.
My understanding is that there were limited private operations even under the former British Railways/British Rail.
It is also worth noting that English common law has traditionally been hostile to monopolies, so it would be wrong to see this as some alien legal concept.