Thousands of federal workers could be laid off without pay, and public works projects in 40 states may have to be suspended in mid-construction.

A program to keep drugs from coming into the United States, and another to keep U.S. technology from going out, may have to be put on hold for a while.

Laid-off National Archives employes won't be able to return to work on former president Nixon's tapes and papers right away, and some airlines will have to wait longer for money the government owes them for carrying the mail.

Funding for these salaries and programs are contained in an "urgent" supplemental appropriations bill that Congress has been working on for months--funds that are needed just to cover ordinary expenses.

The items are not in dispute on Capitol Hill or in the administration. But they are caught in the middle of a tug-of-war over controversial items that have been tacked onto the legislation: subsidies for home buyers and tax deductions and income limits for members of Congress.

A House-Senate conference committee finished its work last week on the bill, but it still must clear two formidable hurdles. First, it must survive a congressional grudge match, with the Senate insisting on repealing tax breaks for members of Congress for their Washington living expenses and the House retaliating with an amendment to limit the outside income of senators.

Once that internecine battle is resolved, the bill then faces the threat of a presidential veto because of its $3 billion mortgage interest rate subsidy program, Congress' quick-fix plan to boost the devastated housing industry. If Reagan does veto the bill, Congress could try to override it or strip the bill of its noncontroversial parts and pass them separately.

But all that takes time--and time is running out for some of the agencies and programs. In addition to the sewer construction projects, for example, some public housing authorities are desperate for operating funds, and 61,000 summer jobs hinge on the bill.

One major concern initially was that some government checks, particularly Social Security checks, would not go out on time because the bill contains the funds for their processing and postage. But this crisis apparently has been delayed, at least until sometime in July, according to Senate aides, through a funds transfer by the Treasury Department.

In the meantime, some federal employes have been warned they may have to be furloughed if the bill does not get through soon. According to agency spokesmen, these include:

* Virtually the entire staffs of three Labor Department agencies--the Bureau of Labor Statistics, the Employment and Training Administration and the Employment Standards Administration--or about 8,000 employes. Workers have been told that if the funds are not approved by July 1, the agencies will have to begin scheduling furloughs.

Some 3,000 Education Department employes, more than half the entire staff, have been warned that they could be furloughed for two weeks between July 19 and Sept. 24.

* More than two-thirds of the Treasury Department's Bureau of Alcohol, Tobacco and Firearms--or 1,900 of 2,700 employes--would be furloughed if funds do not come through by July 11.

* About half of the staff of the tiny Merit Systems Protection Board, or about 160 workers, would have to go on leave starting July 1.

* All 469 employes of the Commerce Department's Economic Development Administration are waiting for $3.5 million worth of salaries in the bill. Without it, all salaries and expenses, including those for the office of the secretary, will run out sometime in mid-July.

The appropriations bill would provide $9 billion, almost double the $4.6 billion requested by the administration. It also would rescind $5.7 billion in previously appropriated funds, most of it in low-income housing construction programs, $2 billion less than the cuts that President Reagan had wanted.

The largest chunk of money, other than for the mortgage subsidy plan, is $2.4 billion for sewer construction grants.

If these funds are delayed much longer, "thousands and thousands" of private-sector engineers and construction workers will have to be laid off throughout the country, said Larry Silverman, legislative director for the Clean Water Action Project, an environmental group. In fact, he said, there are as many jobs at stake here as in the housing subsidy plan, which proponents claim will create employment for about half a million persons in housing-related industries.

"If the president vetoes the bill, it will cause an emergency in the sewage treatment field," Silverman said. Already, 40 states have run out of funds for about 10,000 water projects in progress throughout the country, he said. It would take years for the sewage treatment industry to recover from the disruption that could be caused by the funding delays, he added.

In addition, the credit ratings of municipalities could be in jeopardy if funds are held up, because cities will start to default on bonds issued to pay for part of the water projects, Silverman predicted. This would hamper their ability to raise money in the future, he said.

The District and Montgomery County have severe problems with leaking sewer pipes and are among those waiting for some of the public works money, Silverman said.

The bill also includes $1 billion to fulfill the government's food stamp obligations through September, funds for processing student grants and paying lenders for student loans, for the work incentive program and flood control funds.

Monies are also included for the South Florida Task Force, an administration program to stem the flow of drugs into the United States, and for Operation Exodus, a U.S. Customs Service program to keep American technology out of the hands of unfriendly foreign countries. There are funds to reimburse states for cash and medical aid they provided to Cuban and Haitian refugees.

However, the conference did not approve $50,000 for training Brazilian military officers in the United States. Another $5.8 million for Howard University was deleted, but conferees said the funding would be considered as part of a future appropriations bill.