The House yesterday passed legislation to give domestic and some foreign airlines an estimated $4 billion over the next five years to help pay for quieter airplanes to comply with federal antinoise regulations.

Under the bill, approved 272 to 123, airlines could end up receiving as much as a fourth of the cost of new planes.

The money would come from existing taxes on air fares and freight, plus new taxes on flights and freights to foreign countries. At present, all airline excise taxes go into a trust fund to build and maintain airports and other air facilities.

During an often-spirited eight-gour debate, opponents argued that the bill would set a dangerous precedent by earmakring federal receipts for distribution to a private industry in order to comply with federal regulations.

They predicted that the legislation would encourage a string of other industries subject to federal environmental regulations - such as automobiles, steel and utilities - to seek federal aid as well.

Proponents argued that the airlines would be unable to meet federal noise-abatement standards, to be phased in between 1981 and 1985, unless they are aided financially.

In the Senate, a somewhat different bill to aid the airlines has cleared the Commerce Committee, and is pending in the Finance Committee.

Under the aid plan approved by the House yesterday, an airline could be reimbursed for about one-quarter of the total cost of a new plane depending on the size of the noisy airplane being replaced and the kind of new plane purchased. The airline could then also write off part of the cost through use of the 10 percent investment tax credit.

To get the funds for the airlines' use the bill adopted yesterday would:

Divert one-quarter of the current 8 percent domestic ticket tax for noise-abatement purpose. Technically, the bill would reduce the 8 percent tax - which now goes into the Airport and Airway Development Fund - to 6 percent and then create a new 2 percent tax for the new purpose.

Divert 2 percentage points of the current 5 percent tax on domestic air freight in the same manner.

Raise the current departure tax on flights to foreign countries from $3 to $10 when, as in most cases, the fare is more than $100. The tax on flights costing less than $100 would be $2.

Although bill supporter Rep. Glenn M. Anderson (D-Calif.), chairman of the aviation subcommittee, called the increase in the international travel tax "relatively insignificant," a Transportation Department official yesterday estimated that the bill would raise the amount collected from passengers from about $65 million in this fiscal year to about $200 million.

Establish a new 5 percent tax on air freight leaving the United States.

All the taxes would be in effect until late 1983.

U.S. airlines, which pass the taxes collected on to the government, would be entitled to a refund or tax credit equal to part of their outlays for replacing the noisier airplanes with quieter ones, replacing noisy engines with quieter ones, or altering existing engines to more effectively sound-proof them.

Based on the increased passenger traffic the industry has been experiencing lately, it is estimated that U.S. carriers could get about $3 billion over the next five years.

The bill also for the first time would require foreign airlines operating in the United States to meet federal noise standards by 1985, and would make them eligible for federal aid - maybe as much as $1 billion - to comply.

Supporters of the measure argued that, without federal incentives, the airlines would not meet the standards and Congress would be faced with postponing them. There are an estimated 1,600 noncomplying planes in the industry.

But opponents argued that the Federal government would be helping airlines pay for planes they would be buying anyway. Rep. Charles A. Vanik (D-Ohio) argued that the airlines have already begun replacing the planes that won't meet noise standards because they are old, obsolete and fuel-inefficient. Every plane sold since 1972 meets the new standards, and several airlines are nearly or fully in compliance already.

Vanik had hoped to introduce an amendment that would have eliminated the financing mechanism of the bill and instead would have reduced the 8 percent tax on domestic passenger flights to 6 percent and the 5 percent tax on domestic freight to 3 percent.

Then, he argued, the airlines that needed the money for quieter planes could get it directly through fare increases.

Vanik lost his bid to amend the bill when the House narrowly defeated - by a 199-to-193 vote - an attempt to open the key section to amendment. When the House Rules Committee cleared the measure for House Consideration, it had barred amendment on the controversial financing provisions.

"I have serious constitutional questions about the bill," Vanik complained. "Can the federal voernment establish itself as a collection agency for funds for a private purpose?"