2FA does not require you to have a phone that uses the trusted number. That number is not used unless you explicitly request to get a code via SMS text message or a voice call, which is not the default for Apple's 2FA system.I don't think 2FA will work if you are outside of the US and use a local SIM card in order to get less expensive data on your phone, because your phone number will not be the one registered for 2FA. (Maybe I'm missing something.)
Under normal circumstances, any trusted device with an Internet connection works (while it is logged in to your iCloud account). This is why you can use Macs, Wi-Fi-only iPads and iPod Touches as trusted devices.
If you have a trusted device without an Internet connection, even that is OK - you can manually tell it to generate a code. See my previous post on this subject for the instructions on how to do that.