A proposal to provide government backing for emergency loans to unemployed homeowners facing mortgage foreclosure was rejected 55 to 39 yesterday by the Senate.

The action came as the Senate, keeping step with the pace set by the House on spending measures, approved a bill appropriating money for the Department of Housing and Urban Development, the Environmental Protection Agency and 15 other agencies for fiscal 1984, which begins Oct. 1.

The $49.6 billion measure is about $4.7 billion less than the version that cleared the House, but nearly $4.7 billion more than the administration requested.

The bill passed, 80 to 14, after the mortgage provision was rejected.

The first of 13 appropriations measures to win approval in both houses, the bill now goes to a conference committee to work out differences between the two versions.

Although the administration is not in accord with everything in either version, Republican leaders in both houses have said they have received tentative assurances that it is not a candidate for veto.

The House bill contains $760 million for a mortgage-foreclosure relief program of direct government loans to unemployed homeowners.

The other major difference between the Senate and House versions of the HUD appropriation is that the House included about $600 million more for various subsidized housing programs than the $12 billion in the Senate bill.

The Senate bill provides $4 billion for the Environmental Protection Agency, about $83.5 million less than the House version.

The total includes a $265 million increase above the budget originally submitted by President Reagan.

EPA Administrator William D. Ruckelshaus asked for the additional money last week. It includes $165 million more in operating funds, bringing the EPA's operating budget to $1.1 billion, and a $100 million increase, to $410 million, for the "Superfund" program to clean up abandoned chemical waste dumps.

The House, acting before Ruckelshaus' request, voted to give the EPA even more than he subsequently asked for--$1.3 billion for a 1984 operating budget, the same amount it had in the last year of the Carter administration.

The EPA appropriation also includes $2.4 billion for sewer system construction grants to state and local governments.

In other action yesterday, the House Appropriations Committee defeated efforts to cut 1984 Interior Department spending by 4 percent and passed a $8.4 billion bill imposing a one-year moratorium on several offshore oil lease sales.

The committee wrangled for two hours about restricting oil leasing before passing a compromise amendment that prohibits sales of certain oil tracts off the coast of southern California and Florida.

The amendment allows the Interior Department to do environmental studies and other activities short of selling the leases.

By voice vote the panel also removed a portion of the bill that would have restricted spending for exploration and development as well as leasing and bidding on three Florida tracts in February, 1984.

A group of California congressmen and both senators have sponsored legislation calling for a halt to offshore oil leasing near the coast.

In a 27-to-15 vote, Democrats defeated Republican efforts to impose an across-the-board budget cut next year affecting the Interior Department and related agencies.