A House-Senate conference on balanced-budget legislation broke up in deadlock last night, and an agreement aimed at forestalling a new debt-ceiling crisis at midnight tonight collapsed when it was opposed by Senate Majority Leader Robert J. Dole (R-Kan.).

As a result, it appeared that unless the Democratic-controlled House goes along today with a budget plan acceptable to the Republican-run Senate, the Reagan administration will proceed with plans to tap the Social Security and other trust funds to help finance government operations.

The conferees had hoped to avoid this by agreeing to a procedure that would allow a short-term debt-limit extension for about a week to allow time for another effort to resolve the budget dispute and pass a year-long extension of the debt ceiling.

But Dole, who had not been consulted about this arrangement, told Senate Finance Committee Chairman Bob Packwood (R-Ore.) that he doubted the Senate would agree to it.

"Dole said the votes aren't there," said Packwood, chairman of the conference committee.

The measure, aimed at forcing a balanced budget by fiscal 1991, is part of a bill to raise the national debt ceiling from $1.8 trillion to more than $2 trillion. The Reagan administration set the stage for today's showdown by announcing earlier that, without new congressional action, it would have to begin dipping into the trust funds when interim financing runs out tonight.

By refusing to go along with the conferees' agreement for a short-term extension, the Senate appeared to increase pressure on the House to forgo a Democratic version of the balanced-budget legislation and go along with a plan closely resembling the one originally passed by the Senate.

Until Dole intervened, the deal reached by the conferees called for the Senate to adopt a House-passed short-term debt-ceiling extension provided it was accompanied by some form of the balanced-budget legislation: either a modified version of the Senate bill or an alternative proposed by House Democrats. In either case, the trust funds would have a week's reprieve.

But Dole served notice that the short-term extension would not go far in the Senate. "As far as I'm concerned, they might as well save it," he told his colleagues on the Senate floor.

Collapse of the arrangement followed by a few hours the breakup of the conference, which ended two weeks of inconclusive bargaining climaxed by a last-minute exchange of sharply divergent compromise offers on the balanced-budget plan from House and Senate negotiators.

The two sides rejected each other's proposals, leaving the conference committee deadlocked.

Conferees said changes in the Democratic and Republican versions of the disputed budget legislation were likely before the scheduled showdown in the House today. Packwood said he expected the final version of the Republican plan to set the deficit target for this year at $172 billion, roughly midway between the earlier House and Senate versions.

The original Senate plan, named after sponsors Phil Gramm (R-Tex.), Warren B. Rudman (R-N.H.) and Ernest F. Hollings (D-S.C.) and endorsed by President Reagan, sets mandatory deficit limits declining from $180 billion this year to zero in fiscal 1991.

If the targets were not met at the start of each fiscal year, the president would be required to impose across-the-board cuts in most programs except Social Security in order to meet them.

The alternative proposed by House Democrats would set a $161 billion target for this fiscal year, roughly $20 billion less than the Senate proposed and $10 billion less than the deficit figure in the congressional budget for fiscal 1986.

It would exempt many programs for the poor, ease restrictions during recessions and give critical triggering powers to congressional rather than presidential budget experts. It would also provide for a quick court test of the measure's constitutionality and prohibit the president from cutting domestic programs if he refuses to cut defense.

Senate Republicans responded with a counter-offer that maintained the basic outlines of the Gramm-Rudman-Hollings plan. Differences include making Medicare subject to deeper cuts to help spare defense, injecting the General Accounting Office as an arbiter to settle differences between congressional and administration budget experts and easing provisions during recessions.

The Senate proposed to retain the $180 billion target for this year but would slightly lower the margin of error allowed before automatic cutbacks would be required.

The deficit limit for this year has become a high-profile issue because Democrats charge that Senate Republicans, with 22 seats at stake in elections next fall, are trying to preserve their control by avoiding painful spending cuts before the elections. Republicans counter that there is not time to implement the plan this year.

Meanwhile, the House voted 245 to 174 yesterday for a package of tax increases and spending cuts designed to reduce the deficit by $4.6 billion this year and $19.4 billion over three years.

The bill would make permanent a 16-cent federal cigarette tax that is scheduled to drop back to 8 cents on Nov. 15. One penny of the 16 cents would be earmarked for the tobacco price-support program.

The legislation would also raise the tax on coal for the black-lung disability program, restrict Medicare reimbursement of doctors and hospitals, impose user fees to cover the cost of Customs Service inspections and reauthorize for four years a trade program that assists workers and firms hurt by imports.

The legislation is designed to implement the deficit reductions demanded in the fiscal 1986 budget plan Congress adopted this fall. Two other deficit-reduction bills were approved previously by the House; taken together, they would produce about $77 billion in deficit savings over the next three years.

Deficit-reduction legislation that would produce greater savings is pending in the Senate but has gotten tied up in a dispute over trade legislation. The administration has threatened to veto the Senate and House bills over the cigarette tax and several other provisions.