You’re right in principle, but in practice this is more a more sensitive matter when you share a border with a country like russia.
What they could do is bar any russian from entering unless they can prove on a case-by-case basis at the border that they are escaping persecution in russia for being against the invasion and need to cross it. I think that would be legal and ethical.
You people are another reason bibi is so brazen in killing innocent Palestinians, because he knows that it will help bring back his ally trump.