Yup. UNCLOS is the law that provides for freedom of navigation. Defines territorial waters etc.
The problem here is that of the few nations on earth that have not ratified UNCLOS, and that is small club... both Iran and the US are in it.
Iran and the US have signed UNCLOS, so accept it in principle, but neither have ratified it. And they need to ratify it to be bound by it.
Oman has signed and ratified it. So they are legally bound by it.
It's a point of contention with many nations that the US acts as the worlds policeman, enforcing UNCLOS, but as a state they have not agreed to be bound by it.
I know you know this @logicisall, so just general info for the thread.
As you say, there are two sea lanes in the SoH. One is in Iranian Territorial waters, one is in Oman. But the Oman side is shallower, so deep draft vessels need to use the Iran side, and that complicates things.
And there is stuff about warships that makes it more complex. Because if the US and Iran had ratified it, they need to allow other nations warships the right of free navigation if they are wanting to get somewhere. So likes of the UK and France have to allow Russian warships to Transit the channel. But the warships have to be making innocent passage, and be stood down from combat readiness,
So even if Iran had ratified UNCLOS, it would be their right to stop US combative warships transiting their side. And of course, if the US had ratified it, it would also have to abide by that and not send combative warships in.
If that aint complex enough, it gets worse. Because at time of ratification, states can opt out of certain clauses.