David A. Stockman returned yesterday to the scene of his many triumphs -- a Congress preoccupied with the budget he knows so well -- in a carefully orchestrated appearance that had the aura of a public resurrection.

It was a muted performance, which the embattled Office of Management and Budget director played some distance from center stage, but one clearly designed to show that he and the Reagan administration's economic program are alive and well despite the shellacking they've taken over his expressions of doubt and other remarks in a magazine article.

At the invitation of Republican leaders, Stockman went to the Capitol to help House-Senate conferees work out their differences over the continuing resolution to keep the government running this week.

For the bickering conferees, his reappearance was minimized. The boyish budget wizard who once dazzled senators with his command of numbers was closeted separately because it apparently was felt that his presence in the conference room with tired, disheveled and irritated congressmen might be inflammatory.

"I don't think he has any business in there," declared Sen. Ted Stevens of Alaska, the Republican whip. "It's a Senate-House conference. I asked that he not go in there."

But for public consumption, as Stockman sat a few doors down the corridor adding up figures and presumably saying what the White House would and would not accept, it was a day of cozy reunions with Republicans who had been caught up in his disclosures of months-long doubt about the budget figures and the Reagan economic program. Three squads of still photographers and television cameramen were shuttled in for photos of Stockman chatting with Senate Majority Leader Howard H. Baker Jr. (R-Tenn.)--whose initial reaction to the uproar last week was that Stockman "damaged" both himself and the administration.

A spokesman for Baker explained the resurrection like this: "It's time Stockman came back up here. He's still working. The administration's policy is still working. It's important that the conferees know that."

Some members muttered that the invitation to Stockman was a questionable judgment call. "If it were me quarterbacking this thing, I wouldn't have him up here," said Rep. Les Aspin (D-Wis.). "I would have cooled it."

But he had supporters even among the administration's critics. Sen. Lowell P. Weicker (R-Conn.) blamed not Stockman but the members who had bought his act in the first place. "I don't know why these people say his credibility has been dashed," said Weicker. "He didn't pass these budget and tax bills. The House and Senate did. They should not feel misled."

Stockman arrived about noon with some White House aides, brushed past reporters with a hasty promise to meet them later, and swept into the majority leader's office, where he was quickly joined for photographs by Baker and other Republican leaders. Reporters were instructed that they could ask no questions of anyone in the room.

There are rumors that Stockman may still be dismissed as OMB director for his indiscretions, but his appearance yesterday suggested an administration test to see if his talents are still valuable despite a loss of credibility.

Someone with a talent for making numbers add up was clearly needed. The House-Senate conferees are in dispute over how many billions they are cutting and adding on as they work their way through conflicting spending plans for fiscal 1982, which is already seven weeks under way.

Tempers were frayed when the conferees first met Friday night. They quickly disagreed on the adequacy of their packed meeting room on the House side of the Capitol, and abandoned it for an equally crowded room on the Senate side. A constant buzzing of sideline conversations made it difficult for anyone to hear what anyone else was saying. The conversations, punctuated by shouting matches, meandered haphazardly from defense to foreign aid to the salaries of air traffic controllers to repairs to the Woodrow Wilson Bridge.

At one point, Rep. Clarence Long (D-Md.) angrily demanded a vote on his motion, only to be informed that it already had passed. Shouts of "Can't hear!" echoed noisily and members disappeared periodically, some never to return. Sen. Mark O. Hatfield (R-Ore.) bluntly threatened to go home early unless the chairman, Rep. Jamie L. Whitten (D-Miss.), got the show on the road.

The Friday conference broke up at midnight just after the sudden and unexpected appearance of an amendment that granted House members a 4.8 percent pay increase.

In the debris of documents left behind on the green felt tablecloth was one piece of paper bearing a single word: "Loony."