I don't know the answer to your question, but I do know that your original statement is incorrect. There is no rule preventing you from switching from one specialty to another. In fact, I've had several residents do so, both into and out of Internal Medicine.
There are hurdles to overcome. You'd need to apply for and be considered for a spot in your new field of interest, and if you weren't competitive enough to get it the first time, it's not clear that starting a different field will make you any more competitive. There are funding limits that can cause problems. You may or may not receive credit for your prior training. If you're on a visa in the US, that can complicate matters. Etc. I expect that the issues in Canada are similar.