The House Democratic caucus, defying both its leadership and President Carter, voted overwhelmingly yesterday to seek a cut in Social Security taxes to help pay Social Security or Medicare benefits.

Although the resolution, adopted 150 to 57, is not binding upon congressional committees, it puts pressure on the House Ways and Means Committee to approve such legislation.

Immediately after the vote, Chairman Al Ullman (D-Ore.) of the Ways and Means panel, who had said he opposed a Social Security tax cut this year, said his committee would act on such legislation.

The caucus resolution did not specify the size of the Social Security tax cut nor which portions of the program should be financed by income tax revenues. But it left no doubt House Democrats want some action on the issue.

The vote marked the second major step the House has taken towared rescinding the Social Security tax increases Congress voted in December. On Tuesday the House Budget Committee endorsed such a reversal.

Most of those supporting yesterday's resolution were members who voted to raise payroll taxes in December. The lawmakers voted for the tax increase to shore up the depleted Social Security trust funds, but wavered after constituents began protesting.

The Ways and Means Committee will consider the Social Security issue during its markup of Carter's tax bill, scheduled to begin in mid-April. There are several rival proposals on how to cut or avert payrool tax increases.

Meanwhile, the payroll tax-cut proposal ran into difficulty in the Senate, with renewed opposition from the Carter administration and Sen. Russell B. Long (D-La.), chairman of the Finance Committee.

At a subcommittee hearing, Long said he flatly opposes the use of income tax revenues for any part of the Social Security program, and warned that if Congress wants to cut payroll taxes it should trim Social Security benefits.

At the same time, Treasury Secretary W. Michael Blumenthal reiterated the administration's opposition to a payroll tax cut, cautioning that the proposal needs more study and Congress "ought not to rush into it."

Blumenthal also waffled over a proposal to use revenues from a crude-oil tax to finance a Social Security tax cut. He said Carter prefers not tying the two together, but would "consider it" if Congress passed such a measure.

The administration still is publicly opposing the use of revenues from a crude-oil tax to finance a cut in Social Security taxes. However, Carter has told congressional leaders privately he can "live with" the measures if it passes.

Nevertheless, opponents of a Social Security tax cut appeared to be in the minority on the senae finance sub-committee, a sign that the payroll tax-cut momentum evident in the House may be spreading to the Senate.

Several subcommittee members followed the lead of Chairman Gaylord Nelson (D-Wis.) in asking Blumenthal why the administration, which favored a shift to income tax revenues in 1877, was opposing the step now.

When the secretary tried to answer, Nelson rephrased his question to reflect his view of political realities. "If you're going to be run over by a truck," he asked, "in which position do you want to be found."

Earlier, Carter had told a breakfast meeting of Democratic congressional leaders he was unhappy about the movement toward a Social Security tax cut, but would keep an "open" mind about it if Congress were to vote that way.

The vote in the caucus came despite the opposition of Ullman and the House leadership. Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) and Majority Leader Jim Wright (D-Tex.) voted against the resolution, as did Ullman.

However, Ullman appeared to shift sides during the debate, first saying he was against any use of income tax revenues, and then asserting that even a step would be "okay" if the retirement portion of the Social Security problem were not disturbed.

Besides old-age and survivors pension, the Social Security pays for the hospital insurance segment of the Medicare program and the federal disability insurance program.

Some members of Congress have proposed using income tax revenues to finance the latter two programs, leaving the pension portion linked to Social Security "contributions." Neither segment actually is part of the retirement program.

The House Budget Committee proposal would use a portion of Carter's income tax cut to pay for rolling back Social Security taxes. The step would avert further tax hikes in 1979, but would not affect last January's rise.

Yesterday, Alice M. Rivlin, director of the Congressional Budget Office, reiterated her estimates that a Social Security tax cut would help the economy as much as an income tax cut, and allow inflation as well.

The debate in the caucus was heated, with both liberals and conservatives arguing over several competing proposals, ranging from the general resolution finally adopted to complex formulas for revamping the whole financing plan.

However, the wrangling was cut short unexpectedly when Rep. Fortney H. (Pete) Stark (D-Calif.) abruptly called for an immediate vote. Caucus rules forbade further debate.

There was no immediate indication of how the Social Security tax-cut proposals would fare in Ways and Means. The 25 Democrats on the panel were split in the caucus - 11 for, 11 against and three not voting.

Virginia Rep. Herbert E. Harris and Joseph L. Fisher split on the resolution, with Harris voting for it and Fisher against. Rep. Gladys Noon Spellman of Maryland was not at the caucus session.