Iran’s president apologized for attacks on regional countries as its missiles and drones flew toward Gulf Arab states, suggesting Tehran’s political leadership could not exercise full command over the armed forces.