The House Appropriations Committee sneaked up on President Carter yesterday and dealt him at least a temporary defeat on an issue he thought he had won - abandoning the B-1 bomber.

Carter has proposed that construction of the controversial, costly bomber be stopped after completion of the fourth prototype, which is now being built. Both houses of Congress voted by narrow margins earlier this year to go along with him.

But yesterday the Appropriations Committee on a 34-to-21 vote refused to change the Pentagon budget as Carter wants. And if that refusal stands, under the new congressional budget procedures he will have to build six B-1's.

Because of the way the rules are written, there is no way for the full House or the Senate to reverse the committee's decision. However, Carter could resubmit his request that the budget be amended, and on a second try it is conceivable he might prevail.

Carter has said further construction of the plane would waste $462 million; he claims the plane is not needed.

Rep. Jack Edwards of Alabama, ranking Republican on the House Appropriations subcommittee on defense, called it "unpardonable" for the full committee to work its will on a technicality and not submit it decision to a vote of the full House.

Rep. Robert N. Giaimo (D-Conn.), in decrying the procedures which denied the House the right of reviewing yesterday's Appropriations Commit- tee action, told Chairman George H. Mahon (D-Tex.) that revisions must be made to preserve the integrity of the budget process.

Congressional staffers who saw the campaign building up to keep the B-1 program going complained last night that the White House failed to heed the danger signals in time to offset heavy lobbying by defense contractors and their allies in Congress.

Carter, in his most controversial weapons decision since taking office, announced on June 30 that he had decided to cancel production of the B-1 bomber and rely instead on existing B-52 bombers armed with cruise missiles. He decided to complete only the four research models of the B-1 bomber.

On July 19, the President followed up his cancellation decision with a request to shift $462 million that Congress had already appropriated for the B-1 to other programs. Under the 1974 Impounment Control Act, both the House and Senate must approve such changes - called rescisions - by favourable votes within 45 days.

If the House and Senate do not approve the recissions within 45 days, the President must spend the appropriated money as Congress has earlier specified - in this case for the B-1.

Backers of keeping the B-1 program going by building six rather than four test models deliberately delayed congressional action on the recission request until the 45 days were nearly up. The deadline for approving the rescission is Oct. 4.

LAst Thursday, Rep. Robert L. F. Sikes (D-Fla.) succeeded in getting the defense SDR committee to delay recommending approval of the rescission, arguing that the parent Appropriations Committee should make that decision.

This set the stage for yesterday's showdown voting by the full committee on the immediate future of the $100-million-a-copy bomber, the most expensive combat plane ever built.

Chairman Mahon at the outset of the meeting, watched by a standing-room-only audience which included several defense contractors, reminded committee members that the House and Senate had already passed legislation supporting Carter's decision to cancel the B-1.

Not only have Congress and the Presidnet agreed to cut B-1 production money out of the fiscal 1978 Pentagon budget just passed, Mahon said, but they have agreed as well to continue research on the three B-1 prototypes already flying. The Pentagon, Mahon added, has said that completing the fourth B-1 bomber now under construction would give the Air Force all the test versions it needs.

It would be a waste of money, Mahon and his allies on the committee argued, to build two more B-1s for research purposes. Six bombers would not be enough to serve as any kind of fighting force even if armament and navigation equipment were added to them.

In urging the committee to approve and send to the full House the resolution approving Carter's rescission request, Mohan said: "A matter of this consequence should be presented to the House."