The foreign governments targeted in President-elect Donald Trump’s latest tariff threat said higher U.S. levies designed to rein in drugs and illegal migration could violate the North American free-trade deal Mr. Trump himself negotiated in his first term, and that dialogue is better than confrontation.