Congress yesterday approved an emergency spending bill to keep government offices open through Wednesday as the Senate remained in a legislative quagmire over a civil rights measure holding up passage of long-term funding for the government.

At the same time yesterday, the House swiftly approved a bill that would provide $366 million for increased security at U.S. embassies in the wake of the Sept. 20 bombing of the U.S. Embassy annex in Beirut.

Most government agencies were technically without funds to continue operations when the new fiscal year dawned yesterday at 12:01 a.m. but were ordered to stay in business in anticipation of passage of the emergency measure and its signing by President Reagan.

Federal workers remain on notice from the Office of Management and Budget to continue working as usual unless notified to the contrary.

The emergency measure will last through midnight Wednesday, a deadline fixed to keep up pressure on the Senate to resolve its stubborn dispute over the bigger measure, which is designed to last for the rest of the fiscal year.

"It's not much, but it's all we've got," said Senate Majority Leader Howard H. Baker Jr. (R-Tenn.), as the Senate joined the House in approving the stopgap measure after a brief behind-the-scenes dispute over language inserted by the House to preclude the administration from sending aid to the Nicaraguan rebels during the three-day period.

The emergency funding was needed because Congress has approved only four of its 13 regular appropriations bills for the new fiscal year.

A catchall spending bill to fund the remaining agencies got bogged down in the Senate in the civil rights dispute, which continued yesterday.

The dispute involves a bill, already passed by the House, to reverse a recent Supreme Court decision that narrowed the coverage of major anti-discrimination laws.

The legislation's proponents moved to attach it to the catchall money bill, called a continuing resolution, after being frustrated in attempts to get it considered separately.

This led to a filibuster by conservatives that continues despite the Senate's 92-to-4 vote Saturday to invoke cloture and thereby limit debate.

On the House side, the anti-terrorism bill authorizes the State and Justice departments to provide rewards of up to $500,000 for information about international terrorists.

Senate action on the measure is expected this week.

In addition, the House waded through nearly two dozen other bills in a speedy, workmanlike manner that sharply contrasted with the political wrangling that has brought the Senate to a near standstill.

The House approved by voice vote bills opposed by the administration that would:

*Increase, from $46.25 a day to $53.17, the Medicare reimbursement rate for routine home care provided by hospices. The change would take effect this month.

*Require the Environmental Protection Agency to designate ocean sites where hazardous wastes could be disposed and monitor dumping there. The bill also authorizes additional permit conditions, requires the establishment of a quality-assurance program and imposes penalties for data falsification.

*Extend various provisons for state funding of foster-care services and authorize a network of child-welfare resource centers. The bill increases from $25 to $35 the monthly benefit paid under the Supplemental Security Income program to poor people who live in medical facilities that receive most of their support from the Medicaid program.

Meanwhile, the House voted, 232 to 162, to give final approval to a $932.1 billion congressional budget for fiscal 1985 and in the process voted to raise the government's debt ceiling from $1.57 trillion to $1.82 trillion, theoretically enough to last through the fiscal year.

The Senate approved the long-delayed budget resolution last week but must act separately on the debt-limit extension, which could become another vehicle for controversial amendments in the waning days of the session.

Like the continuing resolution, the debt measure must be passed before Congress adjourns for the year. The government is approaching the current limit on indebtedness and cannot operate without a working line of credit.

The budget, which must be approved by both houses but is not submitted to the president for signature, was supposed to have been passed four months ago. It was delayed by a major dispute over defense spending levels for next year.

The way was cleared for passage of the budget, along with a defense authorization and appropriations bill for the new fiscal year, when House and Senate leaders agreed, with White House concurrence, on a 5 percent after-inflation growth rate for military expenditures.

The budget becomes binding at the start of the new fiscal year, which began yesterday. It sets ceilings for various catagories of spending that, unless specifically waived by Congress, must be observed in passage of authorization and appropriations bills.

During brief debate on the budget, House Minority Leader Robert C. Michel (R-Ill.) said the congressional budget process hasn't worked and should be scuttled. "This isn't deficit reduction; it's deficit disease," he added.

The compromise version of the budget anticipates a deficit of $181.2 billion for fiscal 1985, rising to $207.6 billion by fiscal 1987.

Another bill passed last night would establish a 15-year mandatory prison term and a fine of up to $25,000 for individuals with at least three previous felony convictions for robbery or burglary who are convicted of receiving, possessing or transporting a firearm.