FORT BLISS, Texas—Former Democratic Rep. Beto O’Rourke, weighing a presidential bid, distanced himself from the Democratic socialist movement in his party’s left wing and championed free-market forces to achieve progressive policy goals.

“I’m a capitalist. I don’t see how we’re able to meet any of the fundamental challenges that we have as a country without, in part, harnessing the power of the market,” the 46-year-old told reporters at an Army base in El Paso, which he had represented in Congress. “Climate change is the most immediate example of that. If you’re going to bring the total innovation and ingenuity of this country to bear…our economy is going to have to be a part of that.”

Mr. O’Rourke’s comments came after Vermont Sen. Bernie Sanders, an independent and self-described Democratic socialist, announced Tuesday he would make a second run for president after losing the 2016 Democratic nomination to Hillary Clinton.

During his State of the Union address, President Trump railed against the “new calls to adopt socialism in our country.” Many observers took his comments as a criticism of, among others, Mr. Sanders and Rep. Alexandria Ocasio-Cortez (D., N.Y.), a prominent new member of Congress and member of the Democratic Socialists of America.

The Texan nonetheless praised Mr. Sanders’s candidacy as healthy for the party’s primary in 2020. Mr. O’Rourke, who left the House of Representatives in January, said he still hopes to make his own decision on a White House bid by the end of the month but left the door open for a longer decision-making process.