BRUSSELS—A United Nations court on Wednesday ordered the U.S. to suspend sanctions against Iran that impede trade in humanitarian goods and civil aviation, a ruling Tehran claimed as victory but that Trump administration officials said they weren’t bound by.

The ruling, by the International Court of Justice, could theoretically complicate U.S. efforts to ratchet up economic pressure against Iran.

However,...