There are no official requirements to be prime minister, just that they must lead with the confidence of the House. The government general could technically appoint whoever the hell they want, but by convention a prime minister should be an MP (or at least will soon to be an MP) who leads the leading party or coalition and it would be a complete political shitshow that’d likely lead to a constitutional crisis were it egregiously broken.
Edit: also to specify, the PM isn’t elected by parliament, it’s an appointed position by the governor general
deleted by creator