Indeed several Prime Ministers have lost a vote of confidence, include our two previous Prime Ministers.

Harper and the Conservatives lost a confidence vote in March, 2011, triggering the 2011 general election where the Conservatives came back to win a majority.  Previously Paul Martin and the Liberals lost a confidence vote in November of 2005, triggering the 2006 that the Conservatives ended up winning.

What has not happened in Canadian history, at least at the Federal level, is for a government to lose a confidence vote when they have a majority.  It is theoretically possible but it would require at least a few members of a party to vote against their own government.  We would probably only see that if a MAJOR scandal had occurred.  It nearly happened following the Pacific Scandal in 1873 under Sir John A. Macdonald, but he stepped down before a confidence vote could be held (and didn't quite have a full-fledged majority anyway).