"Vets are allowed legally to treat humans although doctors cannot treat animals"
Treatment as "Practise Medicine"
For the purposes of this answer I will interpret "treat humans" as "practise medicine" as I believe the latter is the relevant term in the UK which corresponds most closely with the intent of the question.
Qualifications for Vets
The Royal College of Veterinary Surgeons say
veterinary surgeons have the initials ‘MRCVS’ or ‘FRCVS’ after their names.
This stands for member, or fellow, of the Royal College of Veterinary Surgeons (RCVS), and indicates their registration with the RCVS, the regulatory body for veterinary surgeons in the UK.
The title ‘veterinary surgeon’ is protected in law: only those who are registered with the RCVS can use the title.
Meaning of "Practise medicine"
The UK General Medical Council says
The licence to practise gives a doctor the legal authority to undertake certain activities, for example prescribing and signing statutory certificates, which the law restricts to doctors registered with a licence to practise.
Who can practice medicine in the UK
The UK General Medical Council says
Before you can practise medicine in the UK you must be both registered and hold a licence to practise with the GMC.
Conclusion
It follows that possession of MRCVS or FRCVS is insufficient to practise medicine on humans in the UK.
Other forms of treatment
The above definition of "Practise medicine" is quite narrow. There are other things doctors do which most people might consider falling into the practise of medicine or medical treatment of humans
The Wikipedia article on the GMC contains the following quote from a 2007 book titled "Medicine, patients and the law" by Emma Cave and Margaret Brazier:
The GMC maintains a register of medical practitioners. However, no law expressly prohibits any unregistered or unqualified person from practicing most types of medicine or even surgery. A criminal offence is committed only when such a person deliberately and falsely represents himself as being a registered practitioner or as having a medical qualification. The rationale of the criminal law is that people should be free to opt for any form of advice or treatment, however bizarre
I don't have access to this book and cannot comment on the sources used to justify this claim, my conclusion assumes the above is correct.
Conclusion
There's no special exemption for vets.
Anybody can provide medical treatment for humans in the UK so long as they don't prescribe, don't sign certain statutory forms, don't falsely represent themselves as qualified doctors of medicine and don't falsely claim to be licensed.
Can Doctors treat animals?
The Royal College of Veterinary Surgeons says
Only registered members of the Royal College of Veterinary Surgeons may practise veterinary surgery. ...
A number of exceptions apply ...
anyone administering emergency first aid to save life or relieve pain or suffering
Overall conclusion
Anyone, including Doctors, can treat animals in emergencies (subject to important provisos)
Anyone, including Vets, can treat humans (with some important restrictions)