President Reagan last night appealed to Congress to approve his entire package of military and economic aid for Central America and said that preservation of friendly governments in the region is of vital interest to the security of the United States.

"The national security of all the Americas is at stake in Central America," Reagan said in a nationally televised address to a joint session of Congress. "If we cannot defend ourselves there, we cannot expect to prevail elsewhere. Our credibility would collapse, our alliances would crumble, and the safety of our homeland would be put in jeopardy."

In urging approval of all funds he has requested for Central America, including $600 million for the region in fiscal 1984 and, most immediately, an additional $110 million for military aid to El Salvador this year, Reagan sought to defuse widespread congressional and public concern that U.S. involvement in the region would turn into "another Vietnam."

"Let me say to those who invoke the memory of Vietnam: there is no thought of sending American combat troops to Central America," Reagan said, drawing a standing ovation from the assembled senators and representatives. "They are not needed--indeed, they have not been requested there. All our neighbors ask of us is assistance in training and arms to protect themselves while they build a better, freer life."

In an effort to win bipartisan support for policies that have been under steady attack, the president made some concessions to congressional concerns.

He said the United States would support "any agreement" reached by Central American countries for withdrawal of all foreign troops and appeared to leave the door open, without specifically making a commitment, for diplomatic efforts that could involve some of the leftist rebels in El Salvador.

The president also formally announced his decision--urged on him by congressional committees--to name an ambassador-at-large as a special envoy to Central America.

Reagan did not identify the envoy, but a high administration official said he would be Richard Stone, a former Democratic senator from Florida who has become the point man for Central American policy in dealings with Capitol Hill. "He's a solid choice," the official said. "He will probably be announced Thursday."

Stone's expected appointment has created considerable controversy, however, because of his outspoken antagonism to leftist viewpoints in Central America and his work for a year as a registered agent here for the rightist government in Guatemala.

In an interview last night, Stone said that his representation was limited to work on a peace treaty with Belize and on human rights violations, and that he quit after a year when progress couldn't be made on either issue. Details on Page A15.

Reagan said the responsibilities of the special envoy "will be to lend U.S. support to the efforts of regional governments to bring peace to this troubled area and to work closely with the Congress to assure the fullest possible, bipartisan coordination of our policies toward the region."

Except for this announcement, there was little new in what the president said last night. In briefings for reporters before the address, administration officials said the speech was designed to overcome congressional resistance to his policies and convince the American public of their wisdom.

Reagan repeatedly asked for "bipartisan consensus" for administration policies that he described as consistent with those of President Carter and of U.S. presidents back to Harry S Truman in 1947.

"President Carter did not hesitate," Reagan said in a rare paragraph of praise for his predecessor. "He authorized arms and ammunition to El Salvador. The guerrilla offensive failed, but not America's will."

Now, said Reagan, guerrillas are on the offensive again, "dedicated to the same philosophy that prevails in Nicaragua, Cuba, and, yes, the Soviet Union."

"Violence has been Nicaragua's most important export to the world," Reagan said. "It is the ultimate in hypocrisy for the unelected Nicaraguan government to charge that we seek their overthrow when they are doing everything they can to bring down the elected government of El Salvador."

This drew another standing ovation from his audience, including House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), on the dais behind Reagan.

The president did not directly address a widespread congressional view that the United States is, through covert CIA action, doing a lot to bring down the leftist Sandinista government in Nicaragua. But he did say, "We do not seek its overthrow."

Reagan's speech was deliberately muted in its rhetoric, administration officials said, in an effort to strike a tone that would win congressional approval and avoid appearing bellicose.

But the president did strongly denounce Nicaragua, which he described as a threat to peace in the region. He said its 25,000-man army, the largest in Central America, was augmented by Cuban advisers and equipped with modern Soviet weapons.

"There are additional thousands of civilian advisers from Cuba, the Soviet Union, East Germany, Libya and the Palestine Liberation Organization," Reagan added. "And we are attacked because we have 55 military trainers in El Salvador."

Reagan summarized the "four basic goals" of U.S. policy in Central America in this way:

* "In response to decades of inequity and indifference, we will support democracy, reform and human freedom." Reagan said this meant using assistance, persuasion and "legitimate leverage" to support free elections and democratic institutions.

"In response to the challenge of world recession and, in the case of El Salvador, to the unrelenting campaign of economic sabotage by the guerrillas, we will support economic development."

* "In response to the military challenge from Cuba and Nicaragua--to their deliberate use of force to spread tyranny--we will support the security of the region's threatened nations. We do not view security assistance as an end in itself, but as a shield for democratization, economic development and diplomacy."

* "We will support dialogue and negotiations--both among the countries of the region and within each country." Reagan said that the timing of and participation in elections are "negotiable," a slight concession to congressional critics who have been urging him to be more flexible in dealing with the Salvadoran insurgents. In the past, Reagan has said it would be wrong to allow these insurgents to "shoot their way" into the democratic process.

Reagan used the statement of these principles as a platform to ask Congress to approve not only the 1984 aid requests but also $80 million in aid for El Salvador that Congress has refused to give him pending military aid requests. A House Appropriations subcommittee on Tuesday voted to approve $30 million of the administration's $110 million request.

Administration officials said all the money is needed if the El Salvador government is to regain the initiative from the guerrillas. Asked how long the effort would take, an official told reporters: "More than a year . . . but less than forever."