Did the UN have any "legal" right to take action?
Do they ever??

Should NATO protect nations not in NATO?
It depends on the circumstances. In this case, yes.

Let's not forget in every single respect Russia invaded a sovereign nation...
What makes you think I've ever forgot that.