WHETHER the new United Nations resolution ends the war between Iran and Iraq is problematical. Still, it has a chance at least of easing the extra layer of crisis that has gathered in the Gulf as the result of the ''tanker war'' -- the two sides' attacks on third-party shipping.

The resolution calls for an immediate cease-fire and withdrawal to recognized boundaries. These appeals are easy for Iraq to accept, but fair as they are, they will not soon be accepted by Iran, which is in aggressive occupation of Iraqi territory and shows no sign of moderating its arrogant demand that Iraq's leader give up power.

That sets the stage for a lesser, informal step -- a cease-fire or reduction of hostilities at sea alone. The cease-fire endorsed by the Security Council is meant to apply ''on land, at sea and in the air.'' Iraq resists a cease-fire confined to sea: it lost its own ports early on and regards its attacks on Iranian shipping as compensatory, justified under international law and necessary. But Washington has a keen political interest in calming the furor over its reflagging -- while continuing the operation. The other Gulf Arabs also appear to accept a course that leaves the burden of launching further naval attacks on Iran. Washington is ready to test the pledge of Speaker Rafsanjani that Iran won't attack others' ships if Iraq, initiator and chief conductor of the ''tanker war,'' stops attacking Iran's.

Iraq is disturbed to find that a resolution framed to squeeze Iran into a fair settlement is being turned politically to restrict one of Iraq's military options. But it is not simply that the United States is in a position to call in a few chits in Baghdad, having brought Moscow aboard a landmark Security Council resolution and having provided naval patronage to Iraq's endangered Kuwaiti allies. One purpose of Iraq's attacks on Iran's shipping was always to draw in outsiders to offset the superior weight of Iran. And as a military tactic, these attacks have had at best erratic effect in cutting down Iran's cargoes.

Furthermore, the United States has every intention to use the resolution -- assuming that Iran ignores the call for a comprehensive cease-fire and withdrawal -- to work with Moscow on an arms embargo. Such an embargo could never be leakproof, but it could have an effect. In this way Americans would be trying to end the war on terms that would save Iraq and that would surely satisfy any near-normal leadership in Tehran. They would, meanwhile, be serving the requirement for slowing the tempo of hostilities in the Gulf.