No it isn't. Most countries work with other countries under a shared set of principles. Even China and Russia do this to an extent. Where deviation happens, it happens when a country can afford to do it (see: south China sea disputes.) Sometimes, they'll do it anyway and suffer (see: North Korea.)
Doing whatever you want is just opening yourself fully to the full spectrum of game theory outcomes. The leadership in Iran is discovering what that means.