If a railway is still in use in UK, am I legally permitted to use a railway velocipede on it? (Or) Is it dangerous even if I can take it off the railway when I hear a train coming?
No, you may not, this would be classed as trespassing. According to the Crown Prosecution Transport Offences site, the rule in question here is:
Section 23 Regulation of the Railways Act 1868: this prohibits passage upon or across any railway line except for the purpose of crossing the line at an authorised point.
TLDR: Join a sanctioned velocipede/speeder club... or volunteer at a heritage railway and earn the privilege.
They sneak up on you
You're wrong about being able to hear a train coming. Now in TV and movies, every time you see a train, you hear a "toot" of some kind. That's not the train. That's the foley, who is a sound engineer who inserts the toot in post-production. Literally. If the camera pans across a train in the background, one little "toot" even though there's no crossing near. This has given people Pavlovian conditioning to think trains go toot.
The best you can hope for is to get a panicked "BRAAMP" that'll make you jump out of the seat when he is 200m behind you, just enough time for you to slow, leap off and watch it get splintered. If the driver is paying attention. If not, you might not hear it 'til 20m away.
There isn’t always a crossing in just the right place
You will almost certainly have to ditch the thing in high rail section. Let me tell you, it's no fun trying to wrestle a velocipede off and over the rails, solo, even if you have all the time in the world.
Now even if a crossing is in just the right place, you still will need about 30 seconds to get stopped, get the thing up out of the flanges and walk it into the clear. At BritRail speeds that means the train would need to be 1km behind you. Remember until the last 15 seconds, cars will be streaming across, then the gates will be down, and cars will be queuing up. You are sure to be filmed. And if a policeman is in the queue, game over.
It's not just trespassing
It's the most serious kind, at least in US law. I would expect similar treatment in UK law, due to the severity of the hazard: to you, your passengers, the poor driver who kills you, the passersby who are hit by debris from your machine, the pedestrians or bikes you hit (since velocipedes do not actuate signals), or the monkey-see monkey-do's who see your YouTube videos and do it also.
In the US the reaction is that your velocipede, handcar, flying shingle, speeder or hy-rail is taken away from you; you are barred from owning or using any such machines; you have a restraining order against doing any further bandit-running (say, on a trip with somebody else); and the judge sizes up your chance of recidivism, and assigns jail as appropriate.
Also, you are barred from a variety of safety, security and transport jobs (simply because the background check will expose this and disqualify you), and if that wasn't enough, you'll be barred for life from most sanctioned velocipede/handcar/speeder events.
The right ways
The simplest way to get track time for your velocipede is to join a local heritage railway. There are plenty and they need help. You can't join just to ride, however presumably you have an affinity for railways, and you get to volunteer, have a lot of fun and make a difference, and as a percolative negotiate track access for velocipede running. You can also keep the velocipede there; if it's pretty, they may even keep it inside as an exhibit. The good news is, heritage railways usually don't to background checks, so your prior bandit-running won't be a disqualifier.
Now if this were North America, I would say join NARCOA - which holds outings by arrangements with local railroads. You pay a fee of $15 to $150, and you get to ride as a group. But being UK, naturally they are fantastic with everything about railways, and there's a group just for velocipedes! I have no idea if the group is able to work with the national rail system, but it wouldn't surprise me honestly.
Now if your thing is just getting to travel unique rights-of-way on throwback technology, then the British canal system is the pride of the world, and that is public access. Talk to CRT.
As etmuse's answer correctly states, from a legal viewpoint you certainly can't simply plonk it down on the track and ride off without permission. Promising to pick it up when you hear a train won't change that. If you want to get permission, most track in the UK is managed by Network Rail. Their website provides information for operators. Only freight and passenger operations are discussed, but I strongly suspect this is your best contact point if you want to request information/permission for what you're doing on any track they manage. That said, I'm pretty sure your chance of getting permission for this on their lines is zero.
You may have a better chance of arranging something on privately operated rail museums/heritage lines, where operations are less frequent and timetables more flexible. But there's no central contact point for that, as far as I'm aware, you'd have to contact the operators of whichever private rail line(s) you'd be interested in. This wikipedia page might help identify candidates. I still wouldn't expect your chances of being given permission to be particularly high, but for the minimal effort required it might be worth sending a few emails or making some phonecalls.
Using your own means of locomotion on a railway has long been disallowed, because it is seriously dangerous. It was only permitted in the very earliest days of railways in Britain (i.e. the first half of the 19th century), and soon ended for both practical and safety reasons.
L.T.C Rolt, in his book on railway safety Red for Danger, writes:
Hitherto it had been accepted as axiomatic that any highway, whether it was a turnpike, canal or a horse tramway, should be open to all on payment of tolls fixed by statute. Indeed, it was held that for the owners of such highways themselves to act as carriers upon them would be unfair to the private trader and it was for this reason that the canal companies were legally debarred from operating their own fleet of boats. The Liverpool & Manchester Railway [opened 1830] was authorized by Parliament upon a similar basis, but fortunately it was soon recognized that at least the new Company must be exclusively responsible for the provision of motive power. The alternative would have been chaos. Imagination boggles at the thought of a number of 'by-traders', canal fashion, each working their own trains over the same stretch of line.
The greater speeds (and stopping distances) on railways, as well as the inability to "get out of the way" of an oncoming vehicle meant that it was impractical and dangerous to allow anyone to run vehicles on a railway other than the owner (or another company that they made a formal agreement with).
The Railway Regulation Act (1840) made it an offense to trespass upon the railway, with a fine of up to five pounds or two months imprisonment for those found guilty. That applies whether you have a velocipede with you or not. The 1868 act of the same name expanded this to state:
If any Person shall be or pass upon any Railway, except for the Purpose of crossing the same at any authorized Crossing, after having received Warning by the Company which works such Railway, or by any of their Agents or Servants, not to go or pass thereon, every Person so offending shall forfeit and pay any Sum not exceeding Forty Shillings for every such Offence.
In this case, a sign saying "do not trespass upon the railway" is sufficient warning. Subsequent legislation has set the fine at up to £1000.
You could, in theory, operate a railway velocipede on the UK mainline railway, with the agreement of the owner (Network Rail). They will not realistically allow you to do so without closing the line to all other traffic, as they have a legal responsibility to ensure the railway is operated safely. They may also charge you handsomely for the privilege, and to compensate the others who would normally use the railway. A private or heritage railway may be more willing to close their line for you, but still at a cost.
As a final word, I'd recommend contacting the UK Railway Velocipede Group for more information and guidance. They organise and advertise raillies for their members at heritage railways, where they can operate their velocipedes safely without the danger of a fifty ton locomotive bearing down upon them.
No you may not. You would be trespassing https://www.networkrail.co.uk/running-the-railway/looking-after-the-railway/delays-explained/vandalism-and-trespass/
It’s a criminal offence under Section 23 Regulation of the Railways Act 1868: this prohibits passage upon or across any railway line except for the purpose of crossing the line at an authorised point. A person commits an offence by so doing after having once received warning by the railway company, their servants or agents, to desist
Sure you can. Get your itinerary and schedule approved by the railroad operator, get your vehicle certified for use on the railway, get a train driver's license and you're good to go.
Speaking seriously, putting an unauthorized vehicle on the tracks will be seen as a deliberate obstruction, sabotage, or attempted mass murder, depending on your motives. You are likely to serve jail time in all those cases.
May I use a railway velocipede on actively-used British railways?
[Image from above link which came from the original question]
May? - no.
Can? - for minutes to hours, yes.
Repeat performances will be limited by subsequent flatness of Velocipede and/or Velocipedaller. See "coin flattening" example below for how real this can be.
I'm in far-off New Zealand, but the following experience will be just as salutary on BR territory.
Long long long ago we used to flatten (then) pennies on railway tracks with the assistance of local trains.
We got used to the timings of trains.
One day we were sitting on a rail waiting for the next train from the normal direction when we were rudely disturbed by the horn of a Diesel-Electric unit approaching from the other direction. A very nasty scare and a lesson learned.
Data point: Fast trains are not good for coin flattening. A coin which has been carefully extruded in X and Y directions and needs a little more flattening will often be unfindable if train speed is high. Whether they adhered to wheels for some rotations or were just flung long distances I know not.
Even though IANAL, I think I can answer for the US and I am confident that the answer generalizes to the UK.
"still in use" is not well defined. Many railroads want to abandon tracks but must go through a lengthy and tedious process to do so. Until they complete that process those tracks are legally considered "still in use" - but we known that there will never again be a train coming down those trucks.
In my city, I have observed municipal and delivery vehicles actually parking on such tracks. This is surely against the law. However, if you want to velocipede on the short stretch of track between the parked city dump truck and the end of the tracks, you will probably be OK. (I am not saying the dump truck will protect you from a train - just that if there were a real risk of a train coming through the dump truck would not be parked there.)
In some isolated cases, this should be reasonably safe.
However, it remains illegal and I would recommend against it.