UNITED NATIONS—The burgeoning crisis confronting the Trump administration in North Korea was compounded this week by another top foreign policy dilemma: the Iran nuclear agreement.

World powers lobbied President Donald Trump this week to stick with the Iran deal, saying U.S. disavowal of that agreement would weaken the effort to persuade North Korea to abandon its own nuclear and missile program.

“Which...