A country is normally not responsible for how weapons they sold are used.
Iran is abandoning its neutrality by delivering weapons to a belligerent.
It can therefore legally be attacked by the other side including allies.
Since Russias war is an illegal war of aggression, which is a violation of the UN charter, Irans weapons deliveries is an affront to the UN, and there may be consequences.
My favourite idea is for the US to lease Navy Ships to Ukraine complete with crew which run a blockade on Iran. Any oil tanker with Iranian Oil should be grabbed and the oil sold for the benefit of Ukraine,