President Reagan said yesterday that a Senate override of his attempt to sell advanced missiles to Saudi Arabia would "seriously undermine" U.S. foreign policy objectives in the Middle East.

In a meeting with Republican congressional leaders, the president appealed for Senate support to sustain his veto of a congressional resolution that would forbid the arms sales.

After the meeting, Senate Majority Leader Robert J. Dole (R-Kan.) and Senate Foreign Relations Committee Chairman Richard G. Lugar (R-Ind.) expressed optimism that the veto would be sustained when the Senate votes Thursday. White House officials, speaking on condition that they not be identified, previously claimed that the president had commitments from the 34 senators he needs to uphold the veto if all 100 senators are present and voting.

But Reagan refused to predict victory during a brief picture-taking session at the beginning of the meeeting, saying, "I'm just superstitious about that sort of thing."

Dole and White House officials said the administration is making the Saudi arms sale a test of presidential leadership. Reagan opened the meeting by saying the United States has had a mutual security pact with Saudi Arabia for more than 40 years and stressing the importance he attaches to sustaining the veto.

"I want all of you to understand that this vote will have a profound effect upon our relations with the Arab world, not just Saudi Arabia," Reagan said. "If the veto isn't sustained, it will seriously undermine our foreign policy objectives throughout the region."

During his meeting the president also appealed for his long-delayed proposal to provide $100 million in aid to the anti-Sandinista rebels in Nicaragua. A vote is due in the House in mid-month, but administration officials are much less optimistic about its prospects than they are about the Saudi arms vote in the Senate.

White House spokesman Edward P. Djerejian quoted Reagan as telling the congressional leaders that food, clothing, medical supplies and ammunition for the rebels are now in short supply.

"It's intolerable that we have waited as long as we have," Djerejian quoted Reagan. "This is a national security matter, not a domestic partisan debate. I am concerned that if we do not find a way to help the freedom fighters very quickly, we will face far more difficult and severe choices in the future."

At the photo-taking session, Reagan was asked whether he agreed with William J. Casey, his director of central intelligence, that members of the news media should be prosecuted for publishing information leaked by government officials.

"It isn't a case of what we may think about it," Reagan said. "There is a law that was passed . . . that's very specific . . . . It's about anyone who makes public information which could be dangerous to our national security. And I would think that all of us are bound by that law."