I don’t claim to know the right solution to any difficulties in international politics, but I can say the difference between the current situation and your hypothetical is that Poland is in the EU so Article 42.7 of the Lisbon treaty world apply, and is also in NATO so Article 5 of the NATO treaty would apply too.