Iran’s supreme leader, Ayatollah Ali Khamenei, said a nuclear deal with the six world powers could go ahead but “ambiguities” in the agreement must be guarded against.