WASHINGTON — When President Trump suggested that he may intervene in the arrest of a Chinese tech executive, he was seeking to leverage her case into a win on trade. But law enforcement officials say the president’s comments could ultimately undermine America’s ability to enforce tough sanctions on Iran and other rogue nations.

Mr. Trump threw himself into the middle of a diplomatic crisis on Tuesday by indicating that he may stop an effort to extradite and prosecute Meng Wanzhou, a top executive at the telecommunications giant Huawei who was arrested in Canada on Saturday on suspicion of fraud related to Iran sanctions, if it would help secure trade concessions from China.

The comment has provoked deep concern among current and former Justice Department officials, who say Mr. Trump’s willingness to interfere with law enforcement actions to accomplish unrelated trade policy goals could put at risk the United States’ ability to go after foreign wrongdoers.

“President Trump’s intervention in this case to use the criminal prosecution of Ms. Meng as a political bargaining chip in the United States’ trade dispute with China not only would complicate vital law enforcement cooperation by the Canadian government in future sensitive matters, but also could undermine the perceived legitimacy, and therefore the success, of the U.S. extradition requests to other countries in national security cases,” said David Laufman, who until February led the Justice Department section that enforces export control and sanctions laws.