With a strategic assist from President Reagan yesterday, a Senate bent on passing tax-overhaul legislation overcame one obstacle after another as amendments on subjects as varied as oil rigs and abortion were defeated or withdrawn.

"It is now clear that no major amendment is going to pass," said Sen. Max Baucus (D-Mont.), whose amendment to maintain Individual Retirement Account deductions for all taxpayers was defeated Wednesday.

Senate leaders continued to predict passage of the tax package by early next week.

After a White House meeting with Reagan, Sens. Gordon J. Humphrey (R-N.H.), William L. Armstrong (R-Colo.) and Jesse Helms (R-N.C.) agreed to withdraw a proposal to deny tax-exempt status to nonprofit institutions that perform or finance abortions -- an amendment that was expected to touch off a prolonged, emotional floor fight.

Reagan told the three senators that he would not support their amendment out of loyalty to the Senate leadership strategy of opposing all changes in the bill, Humphrey said.

"With the failure of all amendments so far to pass, it forced us to change our tactics," Humphrey said. Reagan promised the amendment's sponsors that he would publicly support an antiabortion measure if they attempted to attach it to another bill.

Also withdrawn were two amendments that would have denied certain tax benefits to American companies operating in countries that support terrorism. The sponsors of those proposals, Sens. Charles E. Grassley (R-Iowa) and Alfonse M. D'Amato (R-N.Y.), said Senate leaders pledged to bring the issue to a vote separately before Labor Day.

In a painful vote for many Democratic supporters of tax overhaul, the Senate defeated, 77 to 20, an amendment to remove an exception for the oil and gas industry to the bill's crackdown on tax shelters. Numerous opponents of the oil and gas exception voted to preserve it, in the name of protecting the bill's wide base of support.

Another amendment, to restore the deduction for state and local sales taxes, which the bill would repeal, failed on a voice vote. An amendment to let taxpayers deduct either sales taxes or state and local income taxes was withdrawn in the face of strong opposition. Instead, the Senate passed by a 76-to-21 vote a nonbinding resolution calling for retention of the full sales tax deduction.

Passage of the resolution led Sen. Phil Gramm (R-Tex.) to point out that, coupled with a resolution passed Wednesday supporting the full IRA deduction, the Senate had put itself on record in favor of restoring deductions that would cost $42 billion over five years, without specifying how to pay for them.

Other senators said the resolutions would carry little weight in the conference committee that will be convened, if the Senate bill passes, to reconcile that measure with the House-passed tax-overhaul bill.

"I suspect a sense-of-the-Senate resolution is very much like John Nance Garner's description of the vice presidency: It ain't worth a pitcher of warm spit," said Sen. Daniel J. Evans (R-Wash.).

The legislation would replace the current 15 tax rates for individuals with two rates of 15 percent and 27 percent, and would reduce the corporate tax rate to 33 percent. Those low rates, and the delicately balanced combination of deductions retained and repealed by the Senate Finance Committee, have so far blocked any change during the five days it has been before the Senate.

Senators have eased their concerns about limitations on such deductions as the one for IRAs and state sales taxes by asking Finance Committee Chairman Bob Packwood (R-Ore.) to fight to preserve the deductions in the conference committee.

However, House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) served notice yesterday that House Democrats will not take the lead in restoring deductions axed by the Senate at the price of higher tax rates.

The House bill would curtail IRAs only for taxpayers who contribute to 401(k) tax-deferred savings plans, a less severe cutback than that proposed in the Senate measure.

O'Neill called the IRA deduction -- which the Senate bill would limit to workers not covered by a company pension plan -- "a mighty loophole for the wealthy of America."

He was thought to be echoing the concern of House Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.) that senators will come to the conference table having passed a laundry list of nonbinding resolutions calling for restoration of deductions but without suggesting ways of paying for them.

Several politically popular amendments are expected to be proposed in the next few days. One would restore the deduction for charitable contributions for taxpayers who do not itemize their deductions; another would add a higher top rate of perhaps 35 percent for wealthy taxpayers.

Gramm said he will propose a way to "smooth out" the wide yearly fluctuations in tax revenue the legislation would cause, by creating a special escrow account to hold the roughly $30 billion surplus in the bill's first two years of implementation. The money could not be released until later years, when the bill is scheduled to bring in less revenue than would be brought in by current law.

The debate over the oil and gas exception was one of the most intense thus far during Senate consideration of the tax bill. Sen. Lowell P. Weicker Jr. (R-Conn.), its sponsor, said the provision was included because "the oil industry is the one industry that's still able to work its wiles."

Senate Majority Leader Robert J. Dole (R-Kan.) responded by threatening to propose repealing several tax benefits important to Connecticut that are retained in the bill. He called one of them, the tax credit for rehabilitation of aging properties, "the biggest ripoff in the tax code."

Sen. Bill Bradley (D-N.J.), an ardent opponent of the oil and gas exception and a long-time proponent of taking special favors out of the tax code, said he would nonetheless oppose Weicker's amendment because "I don't want to see this bill falter."