The House yesterday stretched a $15 billion catchall money bill for the rest of fiscal 1980 to include $100 million for resettlement of Cuban and Haitian refugees -- but only after barring prostitutes and convicted felons from receiving any aid.

"Even the Good Lord forgave Mary Magdalene, who became a saint," complained Rep. Silvio O. Conte (R-Mass.) to no avail as the House came out four square against prostitution in the dispensation of aid to local governments beseige by refugees.

The exclusion was proposed by Rep. Robert McClory (R-ILL.), who said he was sympathetic to the problems of the refugees but noted reports that some Cuban emigres have criminal backgrounds and added: "We better know what kind of people we're taking care of."

Meanwhile, the House Ways and Means Committee in a rare closed session, reached tentative agreement on $4.2 billion worth of revenue-raising measures and $2 billion worth of spending cuts.

The higher taxes and spending cuts were required to satsify a mandate laid down by Congress' first budget resolution adopted last week. The Senate Finance Committee continued its efforts to come up with a similar set of recommendations.

The restrictions against aid to prostitutes and felons in the refugee resettlement funds, approved by voice vote, was part of an amendment sought by Florida lawmakers to help their communities cope with thousands of Cubans and Haitians ineligible for current aid programs because they have not been officially designated by the government as refugees.

The omnibus $15 billion that the House has been working on since Tuesday would provide another $100 million for legally certified refugees.

The bill also includes $3.7 billion for federal pay costs, $3.6 billion for defense cost increases, $2.2 billion for Medicaid, $1.5 billion for trade adjustment assistance for workers whose jobs were squeezed out by imports, $1.7 billion in disaster aid, $446 million for food stamps and $343 million for black-lung benefits for coal miners.

Also in the bill is a $28.8 million supplemental payment to the District of Columbia -- less than half the $61.8 million that Mayor Marion Barry sought as part of his effort to erase the city's potential operating deficit.

Funds for these and other programs have been frozen since spring when Congress bumped up against its budget celing for the year that ends Sept. 30. Some programs, such as the trade-related unemployment benefits, have already run out of money; others like black-lung benefits, are about to.

The new spending celing of $572.6 billion, which anticipates a 1980 deficit of nearly $47 billion, was tacked onto the initial budget resolution for 1981 -- largely as leverage to win passage of a spending plan for next year that is at least nominally balanced. When the 1981 budget resolution was finally approved last week, nearly a month behind schedule, the way was cleared for action on the $15 billion supplemental money bill.

As the House moved slowly through proposed amendments, it rejected a proposal to deny $58 million in additional funds for the controversial Tennessee-Tombigbee waterway project through Alabama. It approved an extra $300 million for international disaster relief. It rejected an effort to cut back the trade adjustment assistance program by refusing benefits to workers until other unemployment benefits run out.

Before adjourning last night without completing action on the bill, the House approved outlays that would add more than $600 million to the package, for an overall total so far of more than $15.6 billion.

Meanwhile, Speaker Thomas P. O'Neill Jr. (D-Mass.) came to the rescue of the budget discipline process yesterday by vowing to use his influence to win congressional approval of $6.4 billion in spending cuts required by the weekold budget resolution.

Even if, as expected, the House exceeds the proposed celing for postal and Civil Service spending by approving $500 million to continue Saturday mail deliveries, cuts will eventually have to be made to meet the targets O'Neill said.

"I expect that any inconsistencies . . will be corrected" in a package of spending cuts, known as reconcillation, that Congress will consider this summer, O'Neill told reporters. He said any appropriations bills that threatened to break budget ceilings would be held at the Speaker's desk, thereby keeping them from being sent to the White House for signature, until the spending-cut package is approved.

Most of the $4.2 billion that Ways and Means intends to raise for fiscal 1981 would come from a $3.1 billion change in the way individuals and corporations make estimated payments on the taxes they owe.

Under present law, the taxpayer who must make estimated payments -- essentially those whose income is not subject to withholding -- is required only to pay as much as he owed in taxes the previous year. And in some cases, say a corporation that had a loss the year before, no estimated payments are required. Instead, Ways and Means would require that a least 60 percent of the taxes ultimately due be paid on an estimated basis during the year.

In addition, the committee would raise $400 million be keeping the federal telephone excise tax at 2 percent next year instead of allowing it to fall to 1 percent as scheduled. Another $400 million would come from restricting issurance of tax-free bonds to support housing construction, and $300 million from an increased levy on petro chemical feedstocks to help pay for cleaning up toxic-chemical dump sites.

About $100 million would be raised by ending a growing practice of employers paying their employes' share of Social Security payroll taxes as a of giving them a benefit free of income tax.

From the spending side, Ways and Means would trim $822 million by rescinding House passage of a bill greatly expanding trade adjustment assistance benefits to workers who lose their jobs because of competition from imports.

An additional $675 million would be saved on a one-time basis by ending some special Medicare reimbursements to hospitals.