President Carter scored one of his most impressive legislative victories yesterday when the House voted by a suprisingly large margin to sustain his veto of the $10.1 billion public works appropriations bill.

The vote on the motion to override the veto was 223 to 190. A two-thirds majority is needed to override a presidential veto, giving Carter 53 votes more than the 137 he needed for victory.

Carter was supported by 128 Democrats and 61 Republicans.

The victory enhanced the president's image as an inflation-fighter and as a leader who can deal firmly with Congress. Foe fight had pitted him against most of the congressional leadership, including House Speaker Thomas P. Tip; O'Neill Jr. (D-Mass.). Majority Leader Jim [WORD ILLEGIBLE] D-Tex.; Minority Leader John Rhodes (RAriz.) and Senate Majority Leader Robert C. Byrd (D-W.Va.)

Carter had attacked the bill as inflationary and critized six water projects in it as wasteful and examples of congressional "pork." The congressional leaders defended the bill and said all the projects in it were justified.

The vote also gave a lift to Carter's efforts to reorient national water policy, something he has been trying to do since he first ignited the struggle over water projects early in 1977.

Carter called the fight "tough" and said he was "gratified by the results." But he moved quickly to patch up the rift with the leadership. He invited O'Neill to the White House for a late-afternoon private chat, and said he could "take little personal pleasure in a fight among friends whatever the outcome."

For his part, O'Neill promised to do what he could to present any lingering bitterness.

Both sides pulled out all the stops in what was a high-stakes ballgame involving members of Congress protecting the kinds of public works projects that often help them get reelected.

Wright said, after the vote, that Carter made Lyndon Johnson look like a Sunday school teacher."

The president personally called dozens of legislators, Rep. John T. Myers (R-Ind.), ranking Republican on the Public Works Appropriations subcommittee, said. Last night on our side in the cloakroom Republican members were lined up at the telephones because the president wanted to talk to them."

Carter had 30 Republicans to breakfast yesterday.

Carter also sent each House member a copy of a handwritten letter noting that the wholesale price index rose 0.9 percent in September, and adding, "I urge you to help me control inflation and to set an example of leadership for the nation by supporting my veto of the public works bill."

Other House members were contacted by Cabinet heads, agency heads and state officials from governors to for example, the head of the California Department of Resources, Huey Johnson, who sent a telegram to every member of the California delegation urging them to sustain the president.

There were also reports of strong-arm muscle being used by the congressional side. Rep. Robert W. Edgar (D-Pa.) said members of the Public Works Committee were warning colleagues that they might find their public works project dropped from the bill if they voted with the president.

There were even reports that campaign funds from the leadership campaign chests might be decided to Democratic supporters of the president, but leadership sources strongly denied this.

At issue in the vetoed bill, which also contained about 96 billion worth of funding for energy, were both specific water projects and water policy in general.

The bill contained funding for 53 new water projects at a cost of $1.8 billion, according to the administration. Twenty-six of them costing $640 million the administration had requested. But it objected to Congress' adding 27 new starts. While the Congress funded the 27 at only a down-payment level of $103 million for the fiscal year, the administration complained that if they were fully funded they would cost almost $1.2 billion.

Mostly, the White House objected to money for six water projects knocked out by Congress last year in response to administration's first water project hit list. The six would cost $580 million to complete.

The administration argued that Congress should fully fund water projects from the start, as it does other programs, instead of partially funding them, which, it argued hides the projects' full cost.

In addition, the White House objected to mandated hiring of 2,300 new employes for the Army Corps of Engineers and the Bureau of Reclamation and abolishing of a water resources council.

Rep. Tom Bevill (D-Ala.) said it will be up to the Senate to add the public works and energy funds in the vetoed bill to continuing resolution pending in the Senate, containing money for the Department of Defense, Labor Department and Health, Education and Welfare Department.

Bevill said the resolution might contain everything in the vetoed bill, minus the six old water projects and seven of the 27 new ones Congress wanted.

House debate on the bill was vigorous and pointed. Wright accused the president of demanding an "item veto" and "insisting Congress must come to him for permission to insert every little item in an appropriations bill." He said Congress should not "blindly and submissively" accept the president's demand.

House Speaker O'Neill warned that, 25 years down the road, the country will be facing a water crisis just as it was warned 25 years ago that an emergy crisis was coming.

O'Neill said that when younger members asked him why past Congresses hadn't done things such as solar research and shale programs to take care of the energy crisis the answer was that past Congresses were afraid of being charged with "excessive spending." CAPTION: Picture, President Carter during the process of vetoing the $10.1 billion public works appropriations bill.