President Reagan received powerful messages from Moscow and Iowa last week, and his administration didn't quite know what to do with either of them.

The Iowa message was that loyalty is not enough. Four of five Republicans who participated in Iowa's straw vote preferred someone other than Vice President Bush as their 1988 standard- bearer. White House officials, pledged to vows of silence that might awe the Mafia, refrained from publicly analyzing the results. Nonetheless, some of them were shocked at the magnitude of Bush's repudiation.

Reagan is normal. While he believes that it is proper to remain neutral in the struggle to nominate a successor and will not endorse anyone, intimates say he is privately pulling for Bush.

It would be astounding if this were not the case. Reagan values loyalty, which Bush has displayed in superabundance, and the two men long ago established a friendly relationship. In addition, nomination and election of Bush would put a public stamp of approval on Reaganism as the president rides off into the California sunset.

But the political dynamics of Reagan's last year in office make Sen. Robert J. Dole (R-Kan.) a potentially more valuable ally than Bush. White House chief of staff Howard H. Baker Jr. wants Reagan to leave on a winning note, and he knows that Dole's help could be crucial in the Senate on issues ranging from ratification of the Intermediate-Range Nuclear Forces (INF) Treaty to the budget battle. The danger of Reagan being Reagan, which in this case means blurting his true feelings about Bush, was averted by keeping the president away from the media for several days after the Iowa caucuses.

As usual, Reagan did not resist staff-imposed isolation. He may not even have noticed it.

Some say the president underrates the Iowa result because he bounced back so convincingly after Bush took Iowa from him in 1980. Bush may bounce back, too, but Reagan's situation in 1980 was significantly different from Bush's precarious position.

Reagan had a clear vision of what he wanted to accomplish and unrivaled status within his party. Some Republicans worried about Reagan's age and whether he were up to the job, but no one doubted where he stood on the issues. Reagan unwittingly reinforced these doubts by ducking debates in Iowa in favor of a national, above-the-fray campaign.

After his Iowa defeat, Reagan scrapped this "front-walking" strategy and came down to earth. He had time to recover because more than a month passed between the Iowa caucuses and the New Hampshire primary. What is remembered about Reagan is his dramatic victory over Bush at their Nashua debate; what is forgotten is that Reagan campaigned with intensity for weeks in New Hampshire and had already overhauled Bush in some polls. Bush must do more with less in far less time.

Even more surprising to the White House than the Iowa results was Soviet leader Mikhail Gorbachev's announcement that Soviet troops would be withdrawn from Afghanistan beginning May 15, a date expected to coincide approximately with the Moscow summit. Administration spokesmen responded so cautiously to Gorbachev's statement that they conveyed an impression of being unprepared for it, even though the Soviet leader had announced at the Washington summit that a political decision to quit Afghanistan had been taken.

One would have thought that Reagan might have welcomed the announcement as ratification of a wise and steadfast U.S. policy. He has never hesitated to denounce the 1979 invasion of Afghanistan or the barbaric Soviet conduct that followed it. During his presidency, the United States has worked with Saudi Arabia and Pakistan to deliver vast amounts of military equipment, including the effective Stinger missile, to Afghan guerrillas.

Furthermore, the administration has built a consensus for its policy at home and abroad, something that has eluded it in other regional conflicts. At the same time, to the discomfort of the Republican right wing, Reagan has made it easier for the Soviets to save diplomatic face by accurately pointing out that the invasion did not occur on Gorbachev's watch.

But the ho-hum response to the withdrawal announcement makes the White House seem almost disappointed that Reagan may no longer have Afghanistan as an issue with which to stigmatize Soviet foreign policy. It would be more appropriate that he follow his own example in nuclear-arms negotiations and demonstrate that he is willing to take yes for an answer.