Well, that's the thing. If Russia directly strikes a NATO country, it no longer has anything to do with Ukraine, one way or the other. It's an Article 5 attack on 30 countries, and we're obliged to respond. If we don't, then the whole alliance is a farce and it crumbles like burnt paper, and the entire underpinnings of the collective security we've depended upon for over 70 years vanishes in an every-man-for-himself scrabble of Western nations. There's no way we can allow that to happen or even let an aggressor imagine it could happen. The threat of an overwhelming response to such an attack is really the only thing that wards one off in the first place. If we ever allow that response to become doubtful, then we're all lost.
In such an event, the prudent thing for NATO to do would be to turn any such incursion back to the borders of NATO and then stop, entering neither Russia nor Ukraine. Only a demonstration that our response was wholly defensive would prevent subsequent events from spiralling into a third world war... and even then, it would be tricky. Involving ourselves in Ukraine, which is not a country we are treaty-bound to defend, would rightly be seen by the world as putting NATO on the offensive, and just such a perception is why I objected to us involving ourselves in Yugoslavia under the NATO flag in the 90s. What was "defensive" about that? Yes, we needed to act, but we should have done so under the aegis of the UN—unlikely, due to Russia's veto—or at least as an independent coalition of nations like in Gulf War. Ditto with Libya. We undermined NATO's reputation as a "defensive" organization when we took it on the offensive. That was a mistake.