WASHINGTON—While some American executives have been hesitant to criticize U.S. President Donald Trump or his policies, General Electric Co. Chief Executive Jeff Immelt on Thursday provided a warning for the president: globalization needs an overhaul, but the U.S. should avoid the temptation to throw up barriers to free trade.

“The principles for trade need to be rethought in the modern age,” Mr. Immelt said in a speech at Georgetown University. “The systems of free trade haven’t worked for enough people. But protectionism...