The House yesterday shrugged off a veto threat from President Carter and refused to kill a single water project from a $10.3 billion public works appropriations bill.

The key vote came when the House defeated 234 to 142 an amendment that would have deleted funds for eight water projects killed by Congress a year ago and resurrected by the public works appropriations subcommittee.

But the vote on the amendment offered by Rep. Robert Edgar (D-Pa.) was 17 votes short of the two-thirds necessary to override a veto. Ninety-eight Democrats and 44 Republicans supported Carter's posistion, while 144 Democrats and 90 Republicans voted against it.

Another amendment, which would have eliminated 28 new projects in the bill targeted by the administration as unacceptable, was withdrawn by its sponsor earlier in the day.

Meanwhile, the Senate Appropriations Committee yesterday followed the lead of the House by voting to ban pay raises this year for federal officials being paid more than $47,500. It also voted a 5 1/2 percent ceiling on pay raises for all other federal employes, which may mean smaller raises than planned for lower-paid workers. The committee took the action as it sent to the floor two appropriations bills totaling $1.7 billion for departments of Transporation, Treasury and the Postal Service.

In a televised press conference Tuesday. Carter singled out the public works bill as an example of the kind of legislation he would veto in his effort to attack inflation through spending restraint.

The House voted earlier in the week to cut spending on other appropriations bills, but its refusal to do the same yesterday was attributed to a variety of reasons.

Public works appropriations subcommittee Chairman Tom Bevill (D. Ala.) said the president did not decide to oppose the projects until after the committee had voted out its bill. Bevill said he did not learn until Tuesday of some projects the president wanted in the bill and his veto threats. Coincidentally, the bill is now fatter than before Carter's statement, since Bevill amended the bill to add some 11 projects Carter endorsed in his new water policy. The 11 new projects would cost about $25 million.

Carter had asked for these projects but wanted 28 others deleted. But Rep. George Miller (D-Calif.), who was to offer the amendment to do so, pulled it back at the last minute.

Miller said the decision was his own, that he had informed the White House and it went along. "When we started out on this adventure, my amendment was part of an overall strategy to secure passage of the Edgar amendment," he said. "Those projects are the real monsters in the bill."

But Miller said that strategy was becoming "counterproductive" because House members who wanted to retain projects cut by his amendment were feeling pressured by both the Public Works Committee and the Appropriations Committee to go along with them in opposing Edgar and risk losing their projects.

The administration also had trouble persuading the House that the bill was inflationary. Bevill said in House debate that the public works bill was actually $53.7 million below Carter's original request. He argued the fight was not money, but which programs to fund and that Congress had the prerogative to make that decision.

Majority Whip John Brademas (D-Ind.) said many members felt "the executive branch was actually trying to impose an item veto."

He also said that disagreements with Carter over other issues spilled over to the public works fight. He said one or two members asked him, "What's the president's position? I want to vote the other way."

Enironmentalists strongly supported Carter's offensive.

Maitland Sharpe of the Izeak Walton Leage called yesterday's vote "a clear victory for old-fashioned pork-barrel politics."

But Sharpe and other environmentalists also criticized the administration for not announcing their new water policy until recently and getting a late start in opposing the water projects.

House Speaker Thomas P. (Tip) O'Neill Jr., noting that Carter had retreated from a veto threat on water projects a year ago, said, "There's a long way to go before this bill hits his desk."

The Senate Appropriateions Committee reported out the first two money bills of the year - treasury-postal and transportation - at figures slightly below those of the House, which had acted on them before the California anti-tax vote.

The Senate panel unanimously agreed to ban any pay raise this year for members of Congress, federal judges, members of the Cabinet and anyone else in the government earning more than $47,500 a year.

Then it tentatively voted, 9 to 5, a 5 1/2 percent ceiling on pay raises this year for all other federal workers. President Carter is expected to propose an average 5 1/2 percent raise for federal workers, with a higher percentage going to 520,000 lower paid "blue-collar" workers and less to those in higher brackets.

Sen. Ted Stevens (R-Alaska) called it "idiotic" to take such action before the president submits his proposal and Congress has a chance to review it. If blue-collar workers are denied a raise that keeps up with inflation they will be lost to private employment, he said.

Eleven absent members of the committee will be permitted to vote on this question, but are not expected to change the outcome.

The committee kept in the bill House language forbidding use of the funds to carry out regulations the Treasury Department has written to trace ownership of guns used in crimes. The antigun-control lobby prevailed, but the Senate committee restored $3.8 million of $4.2 million the House cut from the treasury budget because it was believed intended for the gun-tracing program.