Unlock iPhone from Japan to Kazakhstan
If you buy a mobile phone that is locked to a carrier (as is common practice in the US), then you can only use it on that carrier. If you buy an unlocked mobile phone, then you can use it on any carrier. This is true for all mobile phones, including the iPhone.

It sounds like getting an unlocked iPhone in Japan might be difficult, but other Asian countries only sell phones unlocked, as it is illegal for a carrier to lock them in those countries. (This is certainly the case in Thailand, where I live.)

Hong Kong and Singapore also sell all their iPhones unlocked.

It sounds like you might be better off sourcing a phone from one of those countries. It might be possible to buy an iPhone on the 'grey market' in Japan also, but if you do, make sure that you test that the phone works with SIM cards from two different carriers, and that it is not jailbroken, before you buy it. This is because a jailbroken iPhone can be 'software unlocked' to use with any carrier, but doing an OS update in the future would then return the phone to its previous locked state.

My recommendation is to buy an iPhone from a reputable dealer in a country that does not lock its phones (e.g. Hong Kong). Note that unlocked phones are much more expensive than locked phones.