President Reagan and congressional leaders appeared close to breaking their impasse on Social Security and defense spending last night, paving the way for a possible compromise on reducing the deficit.

Senate Majority Leader Robert J. Dole (R-Kan.) said a budget settlement is closer but cautioned that no agreements were reached in a two-hour White House session with the president.

House Majority Leader James C. Wright Jr. (D-Tex.) said the two sides "are now substantially closer because two of the big stumbling blocks have been removed."

White House officials and congressional leaders indicated that the meeting produced a consensus that Social Security inflation adjustments would not be restrained to reduce the deficit, as long as offsetting savings can be found in other areas.

Both Reagan and congressional leaders gave ground on defense issues, with the House agreeing to accept the Senate spending authority figure of $273.1 billion, which would allow military spending to grow with inflation. The Senate yielded to the House projection of actual outlays at a freeze level of $267 billion. Defense Department outlays normally run far below budget projections.

Last Saturday, in his weekly radio speech, Reagan said the House version of the defense budget would cripple U.S. military strength and be a "severe blow" to national security.

The next hurdle for congressional budget negotiators appears to be finding deficit savings to offset those lost by retaining the full Social Security cost-of-living adjustment.

"I believe we have some movement that will lead to a successful conclusion," Dole said, emphasizing that final agreement is contingent on a total package that includes "real savings without a lot of smoke and mirrors."

Wright and House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) expressed optimism that last night's developments would lead to budget approval, although several details are unresolved.

O'Neill said after the meeting that "Social Security in every phase is not on the table."

Dole said Social Security is technically still on the table but "near the edge" of going off it. However, he insisted that Senate-House conferees on the budget must find compensating savings amounting to $22 billion over three years to make up for revenue that would be lost by continuing the Social Security inflation adjustment.

Dole mentioned the possiblity of freezing other government pensions for a year and, as he proposed earlier, bringing state and local government workers under Social Security and Medicare.

Before the White House meeting between congressional leaders and Reagan, O'Neill said he was "in cement" on any proposal that would limit Social Security increases. At the same time, O'Neill said he recognized that Reagan also was "set in cement" against any proposal that increases taxes.

White House spokesman Larry Speakes said earlier that the proposal of a bipartisan group of senators for $59 billion in tax increases was "totally unacceptable."

Senate Minority Leader Robert C. Byrd (D-W.Va.) said it was clear to him from the meeting that Social Security was "off the table" for deficit-reduction purposes, either in the form of a cost-of-living freeze or a tax increase on benefits. "It's the one thing we accomplished in this meeting," he added.

Byrd said Reagan raised the idea of a six-month, rather than one-year, freeze on cost-of-living increases for retirees, but added, "He should realize -- and Mr. Office of Management and Budget Director David A. Stockman concurred -- that Social Security was off the table."

As a substitute for savings from a cost-of-living freeze, Byrd said that he suggested a minimum tax on corporate profits but that Reagan made clear his opposition to tax increases in the deficit-reduction bill.