House-Senate conferees last night approved a massive government spending bill that includes a five-month ban on further aid to guerrillas attempting to overthrow the government of Nicaragua.

The ban could be lifted only if both houses of Congress vote after February to authorize resumption of such aid.

At the same time, the Senate, threatened with a filibuster, gave up on passing a treaty outlawing genocide. Senators expressed support for the treaty's principles and said they would move on the measure next year. But the treaty joined a list of major measures scuttled in the last 10 days because of opposition by an insistent minority.

The catchall spending measure, which includes about $370 billion to finance much of the government for the next 12 months, was approved after being stripped of controversial water projects that had prompted veto threats from the White House.

The measure is smaller than originally drafted because $101 billion in appropriations for the departments of Labor, Education and Health and Human Services was taken out of the bill and passed separately during the day.

The omnibus spending measure, which also includes a major rewrite of federal anticrime statutes, last night passed in the House, 252 to 60. Senate action is expected to follow today.

Republicans said they believe that President Reagan will sign the measure now that the water projects have been eliminated.

"No way he could veto that thing now," said Rep. Silvio O. Conte (R-Mass.), ranking Republican on the House Appropriations Committee. "There'd be a revolution up here if he did."

The final accord on spending, which had to be reached before the 98th Congress could adjourn later this week, was held up in a protracted dispute over whether to bow to administration demands for elimination of politically popular but costly water projects sought by the House and Senate.

The stalemate over the last 10 days led to a half-day shutdown of most of the government last Thursday and passage of four emergency measures to continue funding of agencies for which regular appropriations had not been passed by Oct. 1, the start of fiscal 1985.

Meanwhile, the government neared and perhaps reached the $1.573 trillion limit of its borrowing authority, and Treasury Secretary Donald E. Regan cautioned that further Senate delay in raising the limit could cost the taxpayers and disrupt credit markets.

Congress also gave final approval to legislation that would require U.S. steel-makers to modernize their plants to get continued relief under Reagan's steel import limitation program.

The accord on aid to the Nicaraguan "contra" rebels, which followed months of stalemate between the Democratic-controlled House and Republican-run Senate, would permit only $14 million in assistance for fiscal 1985, even if both chambers vote to release the money after the moratorium expires Feb. 28. The administration had requested $28 million.

The agreement on Nicaragua dealt a serious blow to administration hopes for continuation of once-covert aid to the contras. It permits the president, however, if reelected with a strong mandate, to deal from a position of greater strength on the issue next year.

The House repeatedly has voted to ban use of any funds from military or intelligence sources to aid the contras, while the Senate specifically rejected such a ban, even when coupled with money for phase-out operations, including resettlement of the insurgents and their families. A proposed Senate authorization bill for intelligence operations included the $28 million sought by the administration for the contras.

A decision by House Democratic leaders to drop the water projects in the interest of getting a government spending bill put pressure on Senate Republicans and the administration to compromise on Nicaragua and other defense-related issues blocking a spending agreement.

On these other issues, the conferees agreed to a $1.4 billion compromise on research and development for the administration's proposed "Star Wars" defense plans for space. The Senate had proposed $1.6 billion; the House $1.1 billion.

The conferees also agreed to three tests in space for anti-satellite weapons but not before March 1, giving Congress and the president who will be elected Nov. 6 time to reassess the weapons program, which figures in possible arms-control negotiations with the Soviet Union. They also dropped a Republican demand that the tests be allowed until they prove successful, a condition that Democrats said could mean indefinite testing.

A House proposal to ban introduction of U.S. armed forces into combat in Central America was diluted to advisory, nonbinding "sense of the Congress" language opposing such action.

House-proposed restrictive language on deployment of nuclear-tipped sea-launched cruise missiles also was abandoned by the conferees.

Action on defense-related issues came with relative ease, despite fierce earlier battles over military spending that clogged legislative channels for months. The prospect of long-delayed water projects coming to fruition during the height of a campaign season is what caused the most trouble and heated rhetoric.

Senate Appropriations Committee Chairman Mark O. Hatfield (R-Ore.) set the tone for the session when he reacted angrily to White House objections to suggested compromises and to the Democratic leaders' decision to bow to the objections on water projects.

"Frankly, I think they're looking for an excuse to veto this," Hatfield said of presidential aides, adding that there is "no limitation to their lust" for defense spending at the expense of domestic programs. He accused Democrats of having "caved in" to the White House.

But Conte said it was a "great political move" by House Democrats that could only embarrass the Republicans if they persisted in pushing for the water projects in the face of administration charges that they were budget-busters.

Hatfield, who supported a Bonneville Lock and Dam project that he wanted to protect in the bill, continued to balk until late afternoon when he, too, proposed to strip the bill of water project funding, which included about $100 million in appropriations for this year and $18 billion for long-term authorizations.

By then, however, House Appropriations Committee Chairman Jamie L. Whitten (D-Miss.) had gotten his back up, and he refused to drop the water projects until conferees received assurances from the White House that Reagan would sign the bill, even without the water money.

Whitten suggested that Congress put off the issue until a "lame-duck" session after Nov. 6, a suggestion that appeared to stir little enthusiasm among conferees, who knew that the White House had threatened to veto such a move.

Throughout the session, conferees expressed mounting exasperation at the last-minute feuding, which, many of them noted, was holding up lawmakers' plans to get home and campaign for reelection.

"We're engaged in a game of chicken," Sen. Warren B. Rudman (R-N.H.) said at a particularly sticky point in the deliberations, "and we all look like turkeys."