Two oil tankers were attacked on Thursday and left adrift in the Gulf of Oman, driving up oil prices and stoking fears of a new confrontation between Iran and the United States.