Prostitution, per se, is not illegal in the UK.
Any man or woman can function as a prostitute, with impunity.
What is illegal is the owning, keeping or management of a brothel, by such as a madam. Thus a brothel owner, keeper or manager could be convicted of an offence but the prostitute him/herself would not. A common euphemism applied to such premises is Massage Parlour.
Similarly a customer found on brothel premises cannot be found guilty of that. There is though a law which makes it an offence to pay for sexual services with a prostitute who is exploited by force, deception or threats, risking a fine of up to £1,000 and a criminal record. It is not a valid excuse to say 'I did not know'. This is known as a 'strict liability' offence and applies on or off street.
A prostitute can be convicted of an offence of 'soliciting for the purpose of prostitution in a public place' - for instance on the street, but the offence is not one of being a prostitute but that of soliciting for the purpose of prostitution.
A customer can be convicted of an on street offence if he solicits a prostitute for the purpose of prostitution, in a public place. Customers are rarely charged with an offence if they are on foot, though it is illegal, but are regularly charged if they solicit from a vehicle. The offence then is commonly known as 'kerb (curb) crawling'.
I understand, though I am unsure, that an Escort Agency cannot be convicted of an offence of directing a customer to an Escort, or vice versa, if there is a disclaimer that monetary arrangements are between the customer and the Escort, or any fees for the referral are between the Escort and the Agency - and that the monies are solely for the time the Escort spends with the customer. Most agencies do not quote rates for the escorts on their books and leave that to the individuals.