So it's illegal to travel with a passport with previous name on it?
I don't know if it's legal or not. The bits of regulation I referenced are provincial, not federal or international.
I'm more cautious than others on this forum (so others may have different advice), but I know I'd be hesitant to travel with a passport that did not match my other ID, as mismatched names seem like they could be a problem (credit card in one name, passport in another seems like it could cause difficulties dealing with tickets. A driver's licence in one name and passport in another similarly may make car rental fraught). Obviously, I don't
know that those differences will cause difficulties, but it'd worry me... I expect any difficulties that arise could be fixed, but I'd rather avoid having to deal with that stuff at all.
(And I know of some people who were asked by airport security people to show a second piece of ID. I never experienced it, but a few years ago one colleague was denied permission to get on his (European) flight because of a mismatch between his ID card and his passport.)