The United States cannot devalue the dollar to gain prosperity, former Treasury secretary and ardent Trump critic Larry Summers told CNBC on Tuesday.

"When you signal you don't want your currency to be strong, when you trash your own country for competitiveness, you raise the borrowing costs for every American homeowner and every American company," Summers said, adding that such a move would "make the economy less competitive and less efficient."

Summers was reacting to reports that President Donald Trump asked aides to find a way to weaken the dollar as a way to boost the economy before the 2020 presidential election.

On Friday, top Trump economic advisor Larry Kudlow and two senior administration officials told CNBC's Kayla Tausche the president decided not to intervene in the U.S. currency markets. However, The Wall Street Journal later reported that Trump said he hasn't ruled out intervening.

Trump has often blamed other countries for devaluing their currencies. Earlier in the month, the president said the U.S. should match China and Europe's "currency manipulation game."

Traditionally, past administrations have always maintained publicly they were for a strong dollar because dollar assets such as Treasurys are so widely held around the globe and reflect on the U.S. economy.

"We always used to say, when I was at the Treasury, no nation can devalue its way to prosperity," said Summers, who served as Treasury secretary under former President Bill Clinton and as an economic advisor to former President Barack Obama. "That's ultimately about the quality of its institutions, the hard work of its workers, the entrepreneurship of its business. Those are the fundamental things we should be trying to foster."

A White House spokesperson did not immediately respond to a request for comment on Summers' statements.

— CNBC's Thomas Franck contributed to this report.