I would take a cost-benefit analysis approach and consider Utility.
For instance - if the entire existence of the human race depended on making a decision that would violate international law but save Humanity - then it could be viewed as unethical NOT to violate the laws and save the world.
Conversely - if the benefits did not out weigh the cost - then this would be a poor choice.
Laws, international or domestic, are written by flawed humans and cannot cover every possible contigency. Given that modern technology allows governments to possess lethal power, it is suicidal to take an extreme stance that laws can never be broken. Laws may not be made to be broken ,as the old saying goes, but often they must be.
The USA military industrial complex accounts for $600 billion dollars a year. The USA needs these illegal wars to keep their businesses healthy. Without the wars, USA's ever worsening economic status will resemble Greece. Wars provide the USA meals on wheels and they are justified to keep our people fat and miserable.
I agree with Midnight1131.
In theory you can always come up with a scenario where "sometimes" is justified. I feel as tho the question is worded as to lead you towards a theoretical interpretation and thus agreeing that there could be a possible situation where law must be broken.
However, realistically (in practice) this justification would only ever be "allowed", more accurately, tolerated by powerful/influential nations.
When viewing the question through the prism of reality vs idealism, I would say, no, actions that defy international law are not sometimes justified.
Creating an *international* law and then breaking it is very hypocritical. It basically turns out like this, powerful countries with more influence and military strength [looking at the US] can break international law without ANY repercussions, but if other smaller countries that the US/NATO doesn't like, they would definitely face the consequences of breaking international law.