President Reagan has endorsed the idea of splitting Social Security away from the federal budget sooner than planned, a symbolic shift that could help Republicans deflect criticism in next year's elections over their votes to reduce Social Security benefits, White House officials said yesterday.

Reagan told aides this week he would like to push the idea in his radio address on Saturday, but some officials urged him to use caution because the immediate effect of the action would be to increase the budget deficit.

The proposal would have little practical effect on the nation's 36 million Social Security recipients. But it would make it more difficult for Congress to use surpluses in the pension trust fund to offset huge federal deficits.

Also yesterday, Reagan privately thanked a large group of White House appointees for their concern during his recent cancer surgery, and vowed not to let his second term become a lame-duck presidency. Mentioning battles with Congress over taxes and spending, he said, "I've been sleeping with a veto pen in my pajamas."

Social Security was merged into the "unified" federal budget in the mid-1960s by President Lyndon B. Johnson. Congress voted in 1983 to move Social Security "off budget" effective in 1992 as a way to insulate the program from budget-cutting pressures.

Sen. John Heinz (R-Pa.), chairman of the Senate Special Committee on Aging, said yesterday that Reagan, in a meeting Tuesday, endorsed moving Social Security "off budget" immediately. "It makes it clear to everybody that Social Security is off the table and is going to remain off the table," Heinz said.

He said the resulting increase in the deficit would be desirable because it would create a "sense of urgency" about the problem for Reagan and Congress.

Heinz said he will introduce legislation today that would make the change effective Oct. 1, the begining of fiscal 1986. Other legislation pending in Congress would make the change in fiscal 1987 or later.

Moving Social Security "off budget" would be a bookkeeping maneuver of symbolic importance. Reagan has been dogged by controversy over various plans to restrain Social Security benefits; last year Democratic presidential nominee Walter F. Mondale charged that Reagan had a "secret plan" to cut benefits.

Reagan said in response that Social Security had nothing to do with the deficit, and moving it "off budget" will emphasize this. Although "off-budget" items are separated in accounting practice, there has been pressure recently to incorporate them into the budget.

Social Security is self-contained in that the payroll taxes can only be spent on benefits. But the program directly affects the size of the deficit: the payroll taxes are counted as revenues, and the benefits as spending. Thus, when Social Security spending is reduced -- or taxes increased -- the overall deficit is reduced.

Under current economic assumptions, the combined Old Age and Disability Trust Funds -- the main Social Security pension trust funds -- are projected to run an annual surplus for many years. As long as Social Security is part of the federal budget, these surpluses have the effect of reducing the deficit.