Welcome to the community!
Could you please clarify what you mean? Is the phone locked to a provider located outside of Canada? Are you currently travelling outside of Canada and your phone has connected to a foreign network?
What phone are you using? If your phone is locked to a provider located outside of Canada, you would need to that provider to supply the unlock code for the device. Unfortunately, the Canadian mobile providers wouldn't be able to unlock devices they had not sold. However, there might be third-party services to unlock devices.
If your phone was purchased outside of Canada, you might consider verifying that the device is compatible with the networks. You can verify the compatible bands/frequencies here. You should note that Rogers has decommissioned the GSM network (see here). You should also note that even if the device has compatible bands/frequencies, certain services (ie voLTE and Wifi-calling) won't likely work since the device is not from Fido.
On the other hand, if you are travelling outside of Canada, any usage of Fido services while abroad would be using Fido Roam. The only way to change it to local registration is to replace the SIM card with one from a local provider. If you would like to opt-out of Fido Roam, you would need to contact customer service. Alternatively, you might consider sending @FidoSolutions a PM. Once they verify some information, they'll also be able to access your account. In addition, they can also be contacted via Live Chat, Facebook, or Twitter. Those methods can be accessed via the contact page posted above. Once opted-out, any usage would be on a pay-per-use basis. You can view the usage rates here.
Hope this helps 😀