I believe the technical term for them now is Revenue Protection Officers, although there are a few others such as REO's (Railway Enforcement Officers) and RCO's (Railway Control Officers).
The Criminal Justice and Public Order Act 1994 s34(4) includes "questioning by persons (other than Constables) charged with the duty of investigating offences or charging offenders", so yes, he does have the power to stop you leaving the station if he had a reasonable suspicion that you were committing theft (and this can be considered theft as you did not have a valid ticket for travel).
You have a choice of pay the £40 or you can appeal it in writing within 21 days of the issue date to The Independent Appeals Service, PO Box 89, Portsmouth, P01 1EG.
My advice would be pay the fine. You didn't have a valid ticket to travel when asked to produce one. Any passenger who is found travelling without a valid ticket for their entire journey is liable to be issued with a Penalty Fare of £20 by Merseyrail Ticket Inspectors plus the fare to the destination station if continuing their journey.
The Regulation of Railways Act 1889 s5(2) states that "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."
This law means they can detain and eject people using reasonable force (off a train or station) if they want to. However most train operating companies don't want their staff getting involved in the confrontational side of things.
Hope that helps