Defense Secretary Caspar W. Weinberger, sounding a bit like Civil War Gen. Ulysses S. Grant at Appomattox, yesterday warned his troops at the Pentagon against celebrating their recent budget victory.

Weinberger told his defense deputies in a series of meetings that, rather than celebrate the fact that President Reagan decided to cut only $13 billion from the Pentagon budgets of fiscal 1982, 1983 and 1984, the job now is to maintain control of the Pentagon budget.

There are no "winners" or "losers," he said in an interview yesterday. But what the Pentagon did get, the secretary added, was "a reaffirmation of the commitment" to rearm America. The recently announced cuts, he said, will not undercut the president's "full five-year plan. We feel more than able to cope with" the projected cuts.

As part of the effort to keep Reagan's amended defense budgets intact, Pentagon legislative strategists said yesterday that they will strive to keep the fiscal 1982 defense authorization bill -- the one setting ceilings on how much money Congress can appropriate for research and production of weapons -- from being sent back through the House and Senate to achieve the $2 billion cut Reagan wants for that year.

A Pentagon official said that sending the money bill out of the current House-Senate legislative conference and back to the House and Senate, which have already passed similar versions of the measure, would be an open invitation for "535 different proposals" for cutting it deeper than Reagan has recommended and shifting the money around.

Defense lawyers, he added, have been directed to find ways to achieve the $2 billion cut without sending the bill backward. One idea is to achieve part of it by reducing purchases of ammunition, which are not governed by the pending authorization bill. Another is to ask the conferees to lower the money ceilings on a few non-controversial military programs.

Since the House and Senate armed services committees that authorized the money do not want to start their work all over again, it is virtually certain that they and the Pentagon will find the ways to keep the authorization bill on track. The big battles over how much the Pentagon budget should be cut will be fought in two other arenas, the budget and appropriations committees of the House and Senate.

Weinberger will be President Reagan's point man in this campaign, starting with appearances before the budget committees next week where he will contend that the nation dare not cut the military budget any deeper, given the Soviet buildup. Plans call for Reagan himself to go on television to justify the modest cuts in defense and the larger ones in domestic programs.

"Weinberger told us that there are no victors in this battle," said one Pentagon executive who attended several meetings yesterday conducted by the defense secretary. "We're totally sympathetic with what's going on elsewhere," he added, referring to the deep cuts that other government agencies must absorb to balance the federal budget by 1984.

Grant at Appomattox forbade Union gunners from firing a salute of triumph to celebrate Gen. Robert E. Lee's surrender, in the belief that it was a time to start unifying the nation.

Although Weinberger tried to generate the same kind of spirit inside the Pentagon yesterday, there was plenty of celebration in private. One major reason is that the huge amounts Reagan earmarked for defense -- the totals available over the long term as distinguished from those to be spent in a single year -- suffered only nicks during the administration's budget scrub.

Virtually untouched, for example, were the big additions Reagan made to former President Carter's defense budgets for fiscal 1981 and 1982 in the money available -- or total obligation authority -- account. There, Reagan in March raised fiscal 1981 from $171.2 billion to $178 billion and fiscal 1982 from $196.4 billion to $222.2 billion. Little will be shaved from that $32.6 billion addition for the two years under Reagan's plan. The generals and admirals worry far more about money that will be available to them over five years than how much they will have to spend in a single year. It takes about 10 years to bring a super-weapon into being.