A projectile has struck a ship in the Strait of Hormuz and Iran says the waterway will stay closed until US sanctions and asset freezes are lifted.