Yes, you can stay in Canada until you have 2 years and then apply for a new PR card. There is no law that says you need to have a valid PR card at all times. You need it sometimes to prove your status, when you move to a new province to apply for health care perhaps or get a drivers license but that is about it. If you take care of those things before your PR card expires, you will not need it again. It will not affect your citizenship. Nobody will ask you why you didn't renew it sooner. They are only allowed to look at the last 5 years from the date you apply for renewal. If in those 5 years, you meet the residency requirements, they can not go further back in time.
You should NOT leave Canada during this time. While you wait to fulfill the 2 years, your PR is only safe while you stay in Canada and do not apply to renew your PR. As soon as you leave, you risk getting caught when you return, especially if your PR card is already expired. If the IO at the border believes you haven't been meeting the residency requirements, they request that you prove otherwise and if you can't, you will lose your PR.