At midday yesterday, Minority Leader Robert H. Michel (R-Ill.) thought he could pretty well count the votes to give President Reagan another budget victory in the Democratic House of Representatives.

His shaky coalition of regular Republicans, "Gypsy Moth" GOP moderates and "Boll Weevil" conservative Democrats was holding together.

But suddenly the minority leader was buzzed by a new variety of insect: the "Yellow Jackets." These conservative Republican rebels sent Michel and the White House on a frantic, futile rescue effort which ended 11 hours later with the defeat of the Reagan-backed budget.

Their unanticipated emergence in what Michel privately cursed as a "typical Young Republican stunt" did more than open the gates to Reagan's budget defeat. It changed the power equation for Congress, the Reagan administration and the Republican Party.

It meant that the Republicans--like the Democrats--now have visible organized groups operating to the right, as well as the left, of their party leadership. The task of managing the Republican coalition immediately became more difficult for the president and the party leaders on Capitol Hill, as last night's defeat demonstrated.

The jackets showed their presence by suddenly lighting up the orange bulbs on the House electronic scoreboard that meant they were voting "present" on the first key roll call of the day.

Up for consideration was an amendment by Rep. Mary Rose Oakar (D-Ohio) to the Republican budget Michel and the president were backing. It was to shift $4.8 billion from defense to Medicare, wiping out proposed cuts in the politically popular medical program for the elderly.

The Democratic leadership was backing Oakar in confident expectation that Michel would have the votes to defeat her, thus giving the Democrats yet another of what they call their "grandmas vs. submarines" election issues.

But suddenly, more than 60 hard-core Republicans were abstaining on the vote. This surprise show of displeasure with the Reagan-Michel budget lasted until the final 60 seconds of voting. Then, 51 of the 62 "yellow jackets," by the count of Rep. Newt Gingrich (R-Ga.), one of their leaders, relented and voted with Michel.

But by then the GOP leader had lost control. In the nervous confusion, with the leadership in obvious disarray, both conservative Democrats and Republicans in shaky districts flocked to support Oakar, and 11 of the "yellow jackets" joined them. With no time left on the clock, Michel was stuck with a 228-to-196 vote that stripped the Republican budget of its promised Medicare savings and reduced the defense budget far below the level Reagan wanted.

The tactic was cooked up just a few minutes before the vote, but the split it revealed in the GOP had been brewing for months.

Rep. Bill Archer of Texas said there was "a growing nucleus" of Republicans who believed that the budget deficit must--and could--be cut far below the $100 billion level Reagan had decreed as the best possible for this year. Many of those Republicans--Archer among them--would rather defeat all the pending budgets than accept such a deficit.

The president's lobbying for a budget with such a huge deficit was described by Gingrich as symptomatic of a larger problem. "An administration that set out to change the country," he said, "is increasingly in recent months trying to accommodate itself to the conventional wisdom of the Washington political establishment."

That same criticism has been rolling in from New Right organizations and publications, but yesterday was the first time it stirred a major rebellion within the hitherto disciplined ranks of congressional Republicans.

The Yellow Jackets, however, do not see themselves as rebels, but as keepers of the true Reagan faith. Rep. Hal Daub of Nebraska said, "We are not throwing bombs at the leadership or the White House. We just want the president to know he has more allies from the mainstream of the Republican Party than he has been led to believe."

Their tactics were triggered by Monday's defeat of a budget plan offered by Rep. John H. Rousselot of California, which would ostensibly have balanced the budget immediately by cutting non-defense spending.

The Rousselot plan, opposed by 80 percent of the Democrats and criticized as unrealistic by Michel and other House GOP leaders, was defeated, 242 to 182. But the Yellow Jackets focused on the fact that if they could only have held the support of 36 of the 53 Republicans who voted against them, they could have won.

"Because we lost those 53 Republicans," said Rep. Jim Martin of North Carolina, "we felt we had to show that we represented a more substantial group in the party--that we had to be brought into the bargaining, too."

As of yesterday afternoon, when a harried Michel met with their leaders for two hours to try to bring them back in line, they seemed to have achieved that goal.

Most of them backed Michel on the showdown last night, but the damage of their surprise attack drove off some conservative Democrats and contributed to Reagan's defeat.