From the Regulation of Railways Act 1889 (as amended)
5 Penalty for avoiding payment of fare.
(1)Every passenger by a railway shall, on request by an officer or servant of a railway company, either produce, and if so requested deliver up, a ticket showing that his fare is paid, or pay his fare from the place whence he started, or give the officer or servant his name and address; and in case of default shall be liable on summary conviction to a fine not exceeding level 2 on the standard scale.
Someone with no ticket and no funds is obliged by law to give their name and address.
(2)If a passenger having failed either to produce, or if requested to deliver up, a ticket showing that his fare is paid, or to pay his fare, refuses or fails on request by an officer or servant of a railway company, to give his name and address, any officer of the company may detain him until he can be conveniently brought before some justice or otherwise discharged by due course of law.
So yes, an RPI can detain you, using reasonable force if necessary. They are unlikely to rugby-tackle you these days, but standing in a position where you could not walk past without pushing them isn't uncommon.
(3)If any person—
(a)Travels or attempts to travel on a railway without having previously paid his fare, and with intent to avoid payment thereof; or
(b)Having paid his fare for a certain distance, knowingly and wilfully proceeds by train beyond that distance without previously paying the additional fare for the additional distance, and with intent to avoid payment thereof; or
(c)Having failed to pay his fare, gives in reply to a request by an officer of a railway company a false name or address,
he shall be liable on summary conviction to a fine not exceeding level 3 on the standard scale, or, in the case of a second or subsequent offence, either to a fine not exceeding level 3 on the standard scale, or in the discretion of the court to imprisonment for a term not exceeding three months.
If you give false details and are found out (there are ways of checking, such as the electoral roll) they are liable to pay a fine. By "fine", I don't mean a £100 penalty fare or an out of court settlement, I mean a proper, court-imposed fine of £1,000.
If an RPI or a guard involves the police because someone isn't co-operative, and that person refuses to give details to the police officer, the cuffs are likely to go on. I've seen it happen. If you were just walking down a street you are under no obligation to give your details to a police officer, but if they have a reasonable suspicion that you have committed a crime (which is a given in this scenario, you've already failed to produce your ticket/payment/details to the RPI). Give false details to a police officer and we're into "obstruction of a police officer" territory.