President Reagan yesterday condemned the killing of a U.S. officer in El Salvador and said, "It is not going to change our attitude about the necessity to continue both the economic and the military aid we are giving."

Reagan's comments, in an interview with six foreign journalists, topped a long list of public statements here about the killing of Navy Lt. Cmdr. Albert A. Schaufelberger III late Wednesday in San Salvador.

There was no indication that the slaying of the first U.S. military officer in El Salvador during the Reagan administration would bring about a major change in the Washington debate between defenders and opponents of U.S. policies in Central America.

Administration officials characterized the killing as an act of terrorism, thus separating it to some extent from the U.S. advisory role in the Salvadoran government's war against leftist guerrillas. Schaufelberger was described at the Pentagon not as a military adviser or trainer but as the naval representative to the permanent military group at the U.S. Embassy in charge of coordinating U.S. military sales.

Opponents of administration policy, however, spoke of the killing as an inevitable result of U.S. intervention in El Salvador. Rep. Gerry E. Studds (D-Mass.) said, "There will be a lot more deaths, both Salvadoran and American, if the present policy persists."

The opposition statements were relatively low-key, in keeping with advice to Democrats from House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) not to "go full force" against Reagan's policy as a result of the shooting. "At a time of sorrow, this is not the time to bring up any issues in a political way," O'Neill said.

The killing came as the question of U.S. undercover aid to rebel forces in Nicaragua is being debated on Capitol Hill and under negotiation between the administration and House Democrats.

O'Neill, speaking of the negotiations about ways to avert an immediate executive-legislative clash over the "secret war," told reporters, "I would hope we would not acquiesce in any agreement." He charged that the undercover aid is a violation of U.S. law and said, "I would hope there would be no agreement that would allow the administration to break the law for the remainder of the year."

Rep. Lee H. Hamilton (D-Ind.), who is coordinating the negotiations for House Democrats, said he was continuing to conduct "exploratory" discussions with members of Congress and the administration in the absence of instructions to the contrary from the House Democratic leadership. Hamilton said several different drafts of proposals were being discussed with the administration but added, "We're not close" to agreement.

Reagan, in his interview with the foreign journalists, charged that Nicaragua is "as totalitarian as any communist country" and said that the anti-Sandinista guerrillas are fighting for "democracy, elections."

The killing of Schaufelberger, Reagan said, followed reports he had received that the Salvadoran guerrillas "were going to move in with terrorist groups and move in close to the capital."

United Press International reported that Schaufelberger predicted last Friday in an interview with UPI Television News that Salvadoran guerrillas might turn their violence against the U.S. Navy as a result of battlefield reverses against retrained Salvadoran government troops. "When they figure out what has been happening to them, I expect they will come after the Navy," Schaufelberger was quoted as saying.

In Fripp Island, S.C., Schaufelberger's father, a retired Navy captain, said of his son, "He was doing exactly what he wanted to do." He added, "We last spoke to him Saturday. He was up as always and enthusiastic about some recent results."

Schaufelberger had two younger sisters: Margaret, a detective with the San Diego police, and Kristine, who works for the U.S. Immigration and Naturalization Service in Texas. His younger brother, Tom, is a lawyer in Richmond.

His sister Margaret said that her brother might have been picked for attack because he had been the subject of recent television news interviews. "He had been getting some press, and that made him more visible," she said.30:Picture, ALBERT A. SCHAUFELBERGER III . . . in a photograph taken last week