Not necessarily. How a person who is not an MP could become Prime Minister of Canada is this way. The current Prime Minister resigns and/or retires. His/Her political party then holds a leadership convention. This convention elects as party leader somebody who is not an MP. Because that person is the head of the political party that is also the current government, then that person becomes the Prime Minister. However, to sit in the House of Commons the Prime Minister has to be an MP. What likely happens then is an MP in a riding safe for that political party resigns, a by-election is called, the Prime Minister runs in that riding, gets elected as MP and takes his/her seat. Technically the Prime Minister in that scenario could forego being elected as an MP until the next federal election, however unless there’s only a little while to go anyway that would be giving the Loyal Opposition in the House a divine blessing.