Office of Management and Budget Director David A. Stockman, bucking resistance from both houses of Congress, leaned heavily on Senate Republican leaders yesterday to accept the House version of President Reagan's massive package of nearly $40 billion in spending cuts for next year.

After consulting several times with Stockman in the last few days, Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) again delayed a decision on whether to go ahead with plans for a House-Senate conference on the huge measure, which was approved in slightly different versions by the House and Senate last month.

Baker and House Minority Leader Robert H. Mihcel (R-Ill.) said they thought a conference is likely, despite Stockman's ofjections, and indicated that a decision on the issue will be made today.

Stockman reportedly argued that the whole package could unravel if differences must be resolved in conference and the reaults go back to the House, where Reagan won his victory last month by 217 to 211.

Congressional leaders appeared less worried.

Mihcel said he has assurance from House Democratic leaders that they will not try to obstruct the conference and, in talking with reporters, he discounted fears of defections on a conference compromise.

In the Senate at least some Republicans, including Budget Committee Chairman Pete V. Domenici (N.M.), were described as cool to the idea of tossing out their budget work in favor of the House version.

Senate sources said some House members have told them they are relying on the conference to correct errors and omissions in the House bill, which was hastily put together and circulated only a few hours before being adopted just as Congress' Fourth of July recess was to start.

In addition to meeting with Stockman, Baker conferred with Senate committee chairmen on the issue late yesterday and is expected to do so again today. While a decision to go ahead with the conference is "likely," Baker said, he hopes to restrict the conference's scope to matters in dispute and avoid potential logiams on the entire measure.

Meanwhile, the Democratic-controlled House Appropriations Committee gave the administration a dose of its own budget medicine.

It denied a request to increase the OMB budget and refused to make any appropriation for the office of presidential adviser Martin Anderson, who had refused to testify in support of the funds.

Asserting that UMB should live by the same austerity rules that it is imposing on other agencies, the Appropriations Committee approved a money bill for the Treasury Department, Postal Service and executive agencies that denies Stockman the additional money he wants for OMB next year.

This means OMB will get $33.4 million, exactly what it got this year, rather than the $38.1 million that Stockman wanted.

Overriding protests from Republicans, the committee also voted to deny all funds to the White House's domestic policy staff because its head, presidential aide Anderson, refused to testify before the subcommittee that oversees its spending on grounds that it would violate constitutional separation of powers to do so.

The 50-member staff, now known as the Office of Policy Development, is spending $2.9 million this year and was budgeted for a similar amount next year. Committee Democrats, miffed at what they perceived as a snub by the administration, said the Republican Senate could give the office its money and then let the issue be resolved in conference.

Aside from tweaking the executive nose, the committee appeared to fall in line with Reagan's spending targets as it approved three more appropriations bills -- $22.7 billion for agriculture, $9.8 billion for treasury-post office and $1.1 billion for the legislative branch -- that comply with budget guidelines.

Of the five money bills approved so far, only one -- for energy and interior appropriations -- exceeds the Reagan-blessed budget targets that Congress approved in May, according to congressional experts, and it does so in part of technical reasons.

Although the House Appropriations Committee has apparently met its goals so far, Rep. Bob Traxler (D-Mich.) warned that the heavily cut food stamp program will end up costing as much as $2 billion more than now allowed. This arises from failure to include funds for food stamps in Puerto Rico and for next April's cost-of-living increase for the program and from the fact that cutbacks in other social welfare programs will make more people poor enough to qualify for stamps, according to Traxler.