The Senate Foreign Relations Committee voted, 9 to 8, yesterday against President Reagan's proposed $8.5 billion aircraft sale to Saudi Arabia, but the narrow margin gave a boost to the administration's hope of preventing a congressional veto of the deal by the full Senate.

Especially encouraging to the administration was a last-minute switch by Sen. Larry Pressler (R-S.D.), co-sponsor of the Senate resolution to disapprove the sale. He changed sides after intensive White House lobbying that ended with Reagan personally calling Pressler from Philadelphia in the middle of the committee debate preceding the vote.

In addition, two other Republican committee members whose positions had been unclear--Charles McC. Mathias Jr. of Maryland and S. I. Hayakawa of California--supported the president.

The final tally resulted in an almost straight party-line vote with one of the committee's nine Republicans, Rudy Boschwitz of Minnesota, joining the eight Democrats in sending to the full Senate a resolution disapproving sale of Airborne Warning and Control System radar planes and other equipment.

The Democrats were Claiborne Pell of Rhode Island, Joseph R. Biden Jr. of Delaware, John Glenn of Ohio, Paul S. Sarbanes of Maryland, Paul E. Tsongas of Massachusetts, Alan Cranston of California, Christopher J. Dodd of Connecticut and Edward Zorinsky of Nebraska.

The other Republicans who backed the president were Committee Chairman Charles H. Percy of Illinois, Senate Majority Leader Howard H. Baker Jr. of Tennessee, Jesse Helms of North Carolina, Richard G. Lugar of Indiana and Nancy L. Kassebaum of Kansas.

On Wednesday, the House, by an overwhelming 301-to-111 vote, adopted the resolution of disapproval. However, to block the sale, the Senate must adopt an identical resolution, and the administration has been waging an all-out lobbying campaign to reverse a Senate majority leaning against the Saudi deal.

Following yesterday's committee vote, Baker, who arranged Reagan's call to Pressler, sounded almost euphoric as he asserted that "the momentum is now with the president."

Baker contended that the opposition can depend only on about 45 votes. He estimated the administration's support at 40 senators and predicted that Reagan will have a majority by the week after next when the full Senate is scheduled to vote.

More impartial head-counters on Capitol Hill agreed that the White House has about 40 votes. But, these sources added, at least 53 senators oppose or lean against the sale, and they warned that the administration faces a lot of work to change a sufficient number of minds.

Reagan, in Philadelphia to deliver a speech on the economy, was more restrained in assessing the committee vote. He told reporters:

"Frankly, I'm gratified it was that close. Of course, I wish it went the other way and one of them had a headache and had to go home early."

That was a reference to administration hopes that one of the committee Democrats would fail to vote, producing an 8-to-8 tie that might have blocked efforts to refer the resolution to the full Senate.

Reagan attempted to create such a situation by calling Zorinsky just before the vote and asking him to support the administration or abstain. Zorinsky reportedly promised to think it over and call the president.

During the debate preceding the vote, Zorinsky was the only committee member who declined to make a statement. In the end, though, he failed to return Reagan's call and voted against the president.

Reagan was more successful with Pressler, who gave the debate its most dramatic moment when he revealed his decision to switch.

Pressler said he had been influenced, in part, by a luncheon discussion yesterday with Maxwell Rabb, Reagan's ambassador to Italy. Describing Rabb as "an old friend and an outstanding American-Jewish leader," Pressler said the ambassador had urged him to support the president.

But, Pressler continued, he did not make his decision until he was called out of the debate to talk with Reagan on the phone. He said the president pleaded that the sale had to go through if he were to be a credible leader in foreign policy.

Pressler added that Reagan promised to incorporate a resolution offered by the South Dakota senator into a letter of reassurances about the sale that the White House plans to send to the Senate.

Pressler's resolution calls for balancing the sale by offering additional radar and radio-jamming equipment to Israel to thwart possible use of AWACS planes against the Jewish state. Later, when reporters pointed out to Pressler that Israel says it does not need such equipment, Pressler shrugged and replied cryptically: "Well, that would end the matter."

Administration officials say the letter, which is supposed to commit Reagan to specific written reassurances that the Saudis will not misuse the equipment, is being drafted.

Congressional sources said the administration apparently is holding the letter back deliberately in hopes that it can be used to address the concerns of other senators who might prove willing to support the sale in exchange for such reassurances.

In Philadelphia, Reagan refused to rule out the possibility that he might resort to a provision in the law that some experts say would permit him to go ahead with the sale even if Congress vetoes it.

This waiver provision is contained in 1977 legislation stating that, despite provisions of the Arms Export Control Act, the president may furnish arms to another nation if he informs Congress "that to do so is vital to the national security interests of the United States."

In response to questions about whether he would turn to this loophole, Reagan said:

"Well, it's a hypothetical situation, and . . . . I can't even answer that yet because I don't know whether I would or not."

In a related action yesterday, the Senate Armed Services Committee voted, 10 to 5, for a nonbinding, advisory resolution endorsing the sale. However, that vote offered no real clues to what the full Senate will do since the committee membership is stacked heavily with declared supporters of the sale.

Two opponents, Biden and Glenn, revealed yesterday that the Boeing Co., which manufactures the AWACS plane, is calling on its suppliers around the country to lobby the Senate for approval.

A Mailgram sent to firms dealing with Boeing said: "A negative decision on this issue may affect Saudi Arabia's attitude toward other U.S. products such as commercial aircraft."

Baker said the vote by the full Senate will be scheduled for Oct. 26, 27 or 28. He added that he plans to hold 10 hours of debate and the vote in one day.