President Anwar Sadat's insistence that Egypt will not sign a formal agreement for U.S. access to its Red Sea military base at Ras Banas and that the United States will have to bear all costs of upgrading the run-down facilities presents the incoming Reagan administration with a swift first test of its Middle East policies, according to American military and diplomatic sources here.

The Egyptian position, repeatedly conveyed by Sadat to U.S. military officials and congressional delegations visiting here recently, could become an obstacle to full American use of Ras Banas as a staging area for the planned Rapid Deployment Force to protect the vital Red Sea waterway as well as Saudi Arabia, the world's largest oil exporter.

Ras Banas sits on a spur of land jutting out into the Red Sea almost directly across from the large new Saudi industrial port and oil terminal of Yanbu. While it is perfectly located for American regional military purposes, there is nothing there but an Egyptian caretaker military garrison and would require at least $250 million, and probably much more, to make it serviceable.

Whether the United States will agree to make such a large commitment without a written access agreement and with only an informal verbal understanding regarding its use is a question American diplomats here say the incoming Reagan administration and Congress will have to decide.

Under President Carter, the U.S. expressed willingness to pay for improving the facilities and never publicly asked Sadat for anything more than informal access. A number of congressional and other U.S. delagations here, however, have told Sadat of their desires to see a more specific agreement if such a large sum is to be spent.

Foreign analysts believe Sadat opposes signing any such formal access agreement for Ras Banas because of Egypt's past sour experience with long-term treaties with the Soviet Union and the trouble such an accord might cause him at home as well as in the Arab world.

The issue of Ras Banas is one of a number of potential disagreements looming in Egyptian-American relations at the start of the new administration.Another is a proposal by some Israeli and American policymakers that the United States take over two big Israeli bases in the Sinai, Etzion and Eitam, which are scheduled to be returned to Egypt in 1982 under the Egyptian-Israeli peace accords.

A third potentially divisive issue is the flirtation of the incoming administration with the so-called Jordanian option, the bringing of Jordan into the Middle East peace process now as a way of breaking the deadlock in the Camp David talks on Palestinian autonomy.

The three issues seem likely to serve as the testing ground for the Middle East diplomacy of the new Republican administration and could well determine whether the close American-Egyptian relationship built up between Carter and Sadat through the Camp David process will continue unaltered under President-elect Ronald Reagan.

Sadat is said to have been shocked by Reagan's landslide victory over his close personal friend Carter, but Egyptian officials today are extremely touchy about any suggestions that he may not get along as well with the new American president.

Nonetheless, Sadat has already issued at least one veiled warning to the Reagan administration that it could well "lose" Egypt if it does not take Egyptian sensitivities and views into consideration in formulating a new Republican policy toward the Middle East.

"I want to tell the American people at this moment in particular that when they urge President Reagan to follow a hard-line policy toward the Soviet Union, they should not include America's friends in this policy," Sadat recently told an interviewer. "For if he follows a hard-line policy toward us, he will lose us and lose our feelings."

The United States has an enormous stake in its relationship with Egypt with its largest foreign aid program -- running at over $1 billion annually -- plus a $3.5 billion commitment in arms sales, going to Cairo. Furthermore, Egypt is now Washington's most important Arab military ally, ready and willing to help the United States defend Western interests in the region.

But Sadat seems determined to establish the form and terms of this relationship and has made clear what is, and is not, politically acceptable to him in dealing with Washington.

For instance, he has repeatedly said in public and innumerable private conversations with visiting American dignitaries that Egypt will not agree to allow any foreign power to occupy the two Sinai bases after Israel withdraws from them. He explained that this policy is based on intense Egyptian nationalistic feeling about land lost in war with Israel.

"They keep asking him again and again, and he says no," remarked one American Embassy source familar with Sadat's talks with recent visiting congressional delegations. "He is saying it louder each time."

The latest American lawmakers known to have been given this message on visits here are the House Defense Appropriations Subcommittee chairman, Joseph Addabbo (D-N.Y.), and the House Armed Services Committee lead, Melvin Price, (D-Ill.), who saw Sadat Thursday.

On the issue of Jordan, Sadat made clear his position in talks with visiting former secretary of state Henry Kissinger in late December, indicating he disagreed sharply with the idea of bringing King Hussein into the peace process at this time.