The Reagan administration, after a sobering second look at the results of Sunday's election in El Salvador, yesterday sought to prepare congressional and public opinion for the possibility that the United States might have to work with a government dominated by the political right.

In response to questions about how such a situation would affect future U.S. support, administration officials said that whatever government emerges should be judged not by the parties or individuals it contains but by its commitment to political and social reform.

That was prompted by realization that the combined vote for five rightist parties put them in position to form a coalition that could exclude the centrist Christian Democratic Party of Jose Napoleon Duarte, president of the outgoing U.S.-backed, civilian-military junta.

Of particular concern was fear that Roberto D'Aubuisson, a cashiered army officer whose National Republican Alliance, known as ARENA, gained the second-highest vote, might have major direct or behind-the-scenes influence in the new government.

D'Aubuisson, who was described by former U.S. ambassador Robert E. White as "a pathological killer," has long been identified with coup attempts, paramilitary terrorist activities and opposition to reform.

As U.S. officials noted yesterday, a rightist takeover is far from certain. But if it happens, the administration will face a major new onslaught of congressional and public efforts to withdraw U.S. support from the Salvadoran regime.

That clearly appeared to be uppermost on the minds of administration officials yesterday as they moved away from their euphoric praise of the high voter turnout and cautioned against judging the new Salvadoran government, whatever its composition, too hastily.

Setting the tone was Lawrence S. Eagleburger, undersecretary of state for political affairs, who told a press luncheon: "Let's not snatch defeat from the jaws of victory. What government is formed is basically an issue for the Salvadoran people.

"We look for a government that will support reform, and the decisions we make will obviously be affected by how that government is prepared to deal with reform. But we have to give them a chance to put a government together and see if it's one we can live with and work with."

U.S. officials sought to play down suggestions that the United States is involved in the maneuvering among the various Salvadoran political factions.

However, administration sources acknowledged that Ambassador Deane R. Hinton has been instructed to do everything he can to influence the formation of a government whose policies will be compatible with continued U.S. support.

Specifically, these sources said, Hinton's orders are to try to ensure that Duarte's Christian Democrats, who won the largest number of votes but not a majority, are included in any government and have the maximum possible voice in its affairs.

In addition, the sources added, Hinton has been told to make unmistakably clear to D'Aubuisson that any attempt by him to take a leading or even highly visible role in the government would call into doubt Washington's ability to continue supporting Salvadoran authorities in their struggle against leftist guerrillas.

One source, who described the situation as "very fluid," said "several scenarios are possible." He added that potentially the most fruitful chance for an acceptable outcome involves some variation on the idea of a "national unity government" that would include representation from all or most of the parties but would, if U.S. efforts are successful, be dominated by the Christian Democrats and moderate military officers.

According to the sources, it probably will take several days to get a clearer picture of whether this can be done. In the meantime, they added, the administration publicly will stick to the contention that formation of a government is an internal Salvadoran matter.

To play up the high voter turnout in the face of guerrilla attempts to disrupt the elections, the administration tentatively plans to have Sen. Nancy Landon Kassebaum (R-Kan.), chairman of the U.S. observer delegation, and other members of the group deliver their report directly to President Reagan at the White House, possibly today.