WASHINGTON—President Donald Trump leveled dire warnings at Iran and signaled an interest in an unspecified new deal to rein in Tehran, echoing a suggestion from French President Emmanuel Macron after the two leaders met Tuesday at the White House.

Comments following talks between the two left open the possibility that Mr. Trump would withdraw from the landmark 2015 Iran nuclear agreement by a self-imposed May 12 deadline, as he has continuously threatened to do. Mr. Trump telegraphed that possibility again Tuesday, disparaging...