Other than the ability to survive votes of confidence, are there any rules on who may or may not be Prime Minister of the UK? E.g. could the monarch be the PM? Could a non-UK-national? Could a minor?
The UK constitution is based, in part, on tradition and convention.
By tradition, the Prime Minister must be a member of the House of Commons. As such they must be 18 or over and a British, Irish or Commonwealth citizen. They cannot be a noble, though it is possible to renounce one's hereditary position in order to stand for Parliament. The Queen is also not a commoner, so can't be an MP in the House of Commons, and so can't be Prime Minister. Certain other people are not eligible to be an MP: Civil servants, Police Officers, Judges, Bishops, Soldiers, though they are free to become MPs (and PM) after leaving their post.
However, the advantage of an unwritten constitution is that it can be bent as the need requires. There is no written constitutional requirement for a Prime Minister (although many recent acts of Parliament refer to the post) The title is unofficial (and began as a term of derision); the official post is "First Lord of the Treasury". So there is no written rule that says the PM must be an MP, there is no written rule that says the Queen can't pick her favourite horse to be PM.
But you shouldn't interpret this to mean that the Queen has a free hand to pick whoever she chooses. Tradition is as important to the UK constitution as the Supreme Court is to the US constitution. To ignore the strict requirements of tradition is as incorrect as ignoring the rulings of the Supreme Court in understanding the Constitution of USA.
So short answers are
- No, the Queen cannot be PM
- Yes, a foreign national can be PM (if they are Irish, or from a qualifying Commonwealth country)
- No, a child may not be PM.