Iran does have the right to sell weapons to Russia.
That however means that Iran is not a neutral country any longer.
View attachment 888328
That point of view will not save Iran from the repercussions.
Iranians supporting Irans military or military production can now be legally killed by Ukrainans all over the world as they are valid military targets.
Ukraina can also legally fire ballistic missiles at Iran. That they may not have such missiles, and that Iran might replynis besides the point.
NATO is of course in the same situation, but Russia is carefully avoiding to attack NATO as they are non-belligerent, and Russia wishes they remain non-belligerent.
Good luck getting hold of the US electronics components in such volumes.