The House yesterday gave final approval to a compromise Republican-drafted budget, but the razor-thin margin of 210 to 208 could spell trouble later this summer for legislation to carry it out.

Later, the Senate also indicated that it will approve the compromise as it passed, 51 to 45, a procedural vote considered a critical test for the budget in the Senate. The Senate is expected to vote final approval today.

But hopes that the compromise budget deficit could be kept under $104 billion were dimmed by a new Congressional Budget Office calculation yesterday that estimated the budget's likely 1983 deficit at $116.4 billion.

In addition, it pegged the 1985 deficit at $92.7 billion, rather than the $60 billion forecast by the budget. An earlier re-estimate by the nonpartisan CBO was brushed aside by House and Senate conferees in arriving at their compromise.

In addition to the narrowness of the House vote, prospects for enforcement of the budget were clouded by a Democratic strategy, disclosed by House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), to handle the budget's spending cuts on a piecemeal basis whenever possible and to make Republicans shoulder responsibility for meeting the targets whenever problems arise.

"We're not going to allow ourselves to be put in that position again," O'Neill said, referring to the ease with which President Reagan won sweeping cuts in social programs last year by packaging them together and avoiding individual votes on specific programs.

As assembled by House-Senate conferees and generally supported by the White House, the compromise first budget resolution anticipates spending of $769.8 billion, with a deficit of $103.9 billion, for the 1983 fiscal year starting Oct. 1.

The resolution claims nearly $80 billion in deficit-reduction measures, including more than $20 billion in tax and user fee increases, about $14 billion in domestic program cuts, $7.6 billion in savings from the administration's huge military buildup program, $13.6 billion in "management savings" and $14.5 billion in reduced interest costs.

Over three years, it projects deficit reductions of more than $375 billion, resulting in a 1985 deficit of less than $60 billion. Domestic spending and interest costs would not actually be reduced by the cuts, but would be held below levels they otherwise would have reached.

Among domestic cuts, about half come from appropriations, which would be frozen generally at fiscal 1982 levels, and half from benefit entitlement programs such as Medicare, which would be cut $3.7 billion, more than any other. Federal pay and pensions would be held to 4 percent increases next year, and Social Security would not be touched.

As a down payment on meeting the targets, the resolution orders legislative committees over the next six weeks to come up with "reconciliation" legislation covering the tax increases and about $6.6 billion worth of domestic cuts, totaling $95 billion in tax increases and $22.7 billion in spending cuts through 1985.

The rest of the savings would be accomplished by the administration, in the case of the management savings, and by Congress in its regular authorization and appropriation process.

Money bills that exceed spending targets would be held up short of final passage, and the targets would become binding as spending ceilings if a second budget resolution has not been passed by Oct. 1.

But, with the November congressional elections looming and with the amount of some of the savings in dispute, even some Republicans question whether the $103.9 billion deficit, a record, will be achieved.

Thirty-two Republicans, including at least as many conservatives as moderates, voted against the budget compromise, while Democrats split, 176-to-54, against it. Among area members, Republicans voted for the budget, while Democrats voted against it.