There is no such office known to the law as "Prime Minister' . And that point was formally made as late as the 19th century, and remains law today.
Nowadays the First Lord of the Treasury is usually the senior servant of the Crown, and commonly termed Prime Minister. That is , at best , a title of repute, not an office. In the past it was by no means universal for the First Treasury Lord to be head of government . (Lord Salisbury in the late 19th century held office as Foreign Secretary).
For most of the 18th century the term "Prime Minister" was regarded as derogatory, and an insinuation of unconstitutional behavior.
Since the use of the term is a mere social convention unknown to law, there is no question of preventing the _role_ of Prime Minister evolving. It never did. To make the use of the term remain unconstitutional would probably only require a few prominent figures to continue to use it as a pejorative.
Note that until very recent years, it was quite common for the head of the Government not to be a member of the House of Commons. Nor is there any requirement that he be one today. Normally, when the head of government was not in the Commons, he was a Peer and sat in the House of Lords. But even that is not a legal requirement. Her Majesty may, in law, appoint any of her subjects to the position of First Treasury Lord (or even, indeed, Lord Treasurer). Or to almost any other of the Great Offices of State, and to regard that person as head of Her government and principle servant.
It would be quite interesting to have a PM outside the commons these days, what with Prime Minister's Questions, etc (I'm guessing what would happen is that - assuming no-one was Deputy PM - that a cabinet office minister would answer the questions). The chances of it happening, for more than a few days at least, are minuscule though.