If you put a SIM into a phone that has power and cell access, then an association between the SIM and the phone's IMEI will be recorded somewhere.
If your identity is linked to that SIM, then it's only one more step to link your identity to the phone, of course. You'll have to decide for yourself whether that's unsafe for you.