Incoming Senate Majority Leader Robert J. Dole (R-Kan.) said yesterday after meeting with White House chief of staff James A. Baker III that there are "the makings of maybe an agreement" on a federal spending "freeze" for next year, but some programs still would have to be cut sharply.

Dole said that "there is a lot of support" in Congress for the concept. "I think there is the makings of maybe an agreement that we ought to adopt the freeze concept; I think that's about where we are. Go back and look at the votes of Democrats and Republicans; I think there's a majority there for the concept.

"If we can put together the right formula for a majority of votes in the Senate, I think we ought to do it and do it quickly next year," Dole said. He appeared to be suggesting that the White House and Senate Republicans could agree on a spending freeze approach. Even if they do, however, it is certain to face opposition from House Democrats.

Dole said that a spending freeze would not be entirely across-the-board. "Some programs are going to be treated differently than others. Some programs are going to do fairly badly," he said.

Dole added that benefits and cost-of-living adjustments in Social Security would not be subject to any freeze.

Dole and other congressional Republicans have been pressing for spending restraint that would include the Defense Department, but President Reagan has not yet indicated whether he would be willing to accept slower growth in the defense buildup.

Baker said Reagan is considering the freeze concept. Baker and Office of Management and Budget Director David A. Stockman went to Capitol Hill yesterday to discuss Reagan's budget planning for fiscal 1986 one day after congressional Republican leaders asked Reagan to adopt a budget freeze that would include the Pentagon. Baker also met yesterday with incoming Senate Finance Committee Chairman Bob Packwood (R-Ore.).

After meeting with Stockman, House Minority Leader Robert H. Michel (R-Ill.) said it would be difficult to impose a "hard" freeze on government spending because of Reagan's campaign pledge not to tamper with Social Security.

But, Michel said, "We're not saying defense is off the table."

Michel urged Reagan this week to stretch out his defense buildup to reduce projected $200 billion yearly deficits. Dole said yesterday that a freeze also would have to allow for spending increases on some programs for the poor.

Also, Michel said, "If we're talking about a freeze, a modified freeze, something that is in that character, to hold steady for a year, there has to still be a little bit of flexibility up and down in certain programs."

There are many different versions on a federal spending "freeze." Some would include defense spending, others domestic spending only. The White House concept really would be a lid on overall spending. Within that, some programs would be frozen, some cut, and some killed.

"Eliminating, we prefer," said White House spokesman Larry Speakes.

Speakes said Reagan is attempting to hold next fiscal year's total spending at this year's level of $968 billion, including interest payments on the national debt, which are rising and cannot be cut. In the plan now taking shape, some items such as Social Security and defense would increase while many domestic spending programs would be sharply curtailed or eliminated.

Speakes said Reagan would not attempt, however, to eliminate the Department of Education in the fiscal 1986 budget request he will submit to Congress in January.

Focusing on housing and Medicaid, Reagan continued to work on budget options yesterday in a meeting with his "core group" of advisers. The meetings will continue next week, when the president will decide on defense spending.

Speakes said Reagan was hoping to identify about $40 billion in savings for next fiscal year. This would reduce the projected deficit from $210 billion to $170 billion, or about 4 percent of the nation's gross national product. However, Reagan has decided on only some of those $40 billion in cuts for next year.

Reagan's overall goal is to reduce the deficit to about $100 billion in 1988, or about 2 percent of GNP.

If Reagan seeks to freeze overall spending at $968 billion next year, he might have to seek still deeper cuts to offset the expected $20 billion rise in interest on the national debt.

But one official said Reagan probably would not use that to try to take another $20 billion out of domestic spending.