Yes, trams in the UK have never carried registration numbers, and their drivers were not licensed either as part of the motor vehicle (car) licensing system or via the Traffic Commissioners' PSV licensing system.
I can't think of any tram system where the trams never carried fleet numbers fairly prominently, but not sure if this was a legal requirement.
Prior to the new generation of trams appearing at Blackpool, many tram drivers also held PSV / PCV driving licences, but that was because they had previously been bus drivers, or were employed mainly as bus drivers but drove trams in the summer. (I don't know if that's still the case.)
I understand that the law / driving licence class for trolleybuses stayed in existence for a decade or two after the UK's last trolleybuses ran, but I think the relevant laws have lapsed - it may have happened in the early 90s when the driving licence classes changed and the old separate PSV licence became class D on the Swansea issued licence. (this is from memory so may be adrift.)
Itvwas certainly still a category when I took my (car) test in 1979.
The requirments for all categories were listed on the test invitation, and oOut of interest I read the requirements for the trolleybus test, which included turning to right and left without de-wiring.
The last trolleybus in the UK ran, in Bradford in 1972, I think, so had anyone wanted to resurrect them in 1979 there would have been people still qualified to train and examine new drivers. I doubt many are left now though.
I believe quite a number of tram drivers in Glasgow, which finally shut down in 1962, either couldn't pass the bus driving test or didn't want to, with the heavy steering and crash gearboxes of the era, so transferred to the Glasgow Underground. When that closed in 1977 for modernisation most of them then retired. You must bear in mind that into the 1950s having a car, and thus a driving licence, was something for the more wealthy members of society, which did not embrace potential bus (and lorry) drivers, and many of these came to the job with no licence at all and had to train from scratch - or having been in the army had done this for some, where the military had faced a similar problem.
A similar thing happend in the 1930s. My grandfather drove steam lorries, but his company switched to petrol following the Road Traffic Act which penalised steam because lorries were to be taxed by weight. The RTA also introduced driving tests, and as my grandfather had never driven a vehicle with gears he couldn't (ironically) be "grandfathered" to automatically get a licence.
Unlike many of his generation, he had not learned to drive petrol lorries in the army in WW1.
He never did take a driving test but, sadly, died after being knocked off his bike by a car when my father was still in his teens.