Speaker Paul RyanPaul Davis RyanMcConnell: 'Whoever gets to 60 wins' on immigration Overnight Defense: Latest on spending fight - House passes stopgap with defense money while Senate nears two-year budget deal | Pentagon planning military parade for Trump | Afghan war will cost B in 2018 House passes stopgap spending measure with defense money MORE (R-Wis.) on Thursday said congressional Republicans will work with Donald TrumpDonald John TrumpTillerson: Russia already looking to interfere in 2018 midterms Dems pick up deep-red legislative seat in Missouri Speier on Trump's desire for military parade: 'We have a Napoleon in the making' MORE if he succeeds in winning the Republican presidential nomination.

“We’ll make it work if it happens,” Ryan said in an interview with CNBC’s John Harwood. “I’m going to defend our ideas as the Republican Party, but we’re going to have to work with whoever our nominee is.”

Ryan, who was the GOP's vice presidential nominee in 2012, addressed policy differences between Trump and Republicans in Congress, namely on what should be done with Medicare and Social Security. Trump has said the benefits in those programs should not be cut. 

“It’s not unreasonable for people who paid into a system for decades to expect to get their money’s worth — that’s not an 'entitlement,' that’s honoring a deal,” the front-running candidate wrote in his book “Time to Get Tough” in 2011.

But Ryan and other Republicans argue Medicare and Social Security need to be reformed before both programs become insolvent and ultimately bankrupt.

“I think for younger people like myself, they’re not going to be there for my generation when we retire,” Ryan said. “You have to change these benefits to prevent them from going bankrupt.” 

Those differences aside, the Speaker said he believes a Trump presidency would be less harmful than another Democrat succeeding President Obama.

“What we’re worried about is having more of the same, which is all these big problems that are facing our country that are piling up. They’re still fixable,” he said. “If we have another presidency like this presidency, then I really do worry that the best days will be behind us, and that’s the problem.”