In the huge continuing resolution that Congress passed to keep the government afloat until mid-December, the small matter of Ricky Marfori was nestled between provisions on nuclear weapons and highway grants.

And for a while it seemed as if the entire government could become hung up on the question of whether an 11-year-old Filipino and his mother, living in Madison, Wis., could remain in the United States.

Fortunately, statesmanship prevailed. "I'm not going to hold up the wheels of government," said Wisconsin Rep. F. James Sensenbrenner Jr. (R). With that he ended a two-year tussle between the House and Senate which found its way into the big funding bill.

The saga of how the Marforis got mixed up in the legislation began 10 years ago when Tessie Marfori and her son came to the United States with her husband who needed cancer treatments. When her husband died in 1979, the U.S. Immigration Service told Marfori, now a Madison accountant, and her son to leave or they would be deported. There was no provision in the immigration law to allow them to stay.

Sen. William Proxmire (D-Wis.) came to the rescue last year with a so-called private bill to allow them to stay anyway. His bill passed the Senate, but was knocked off the calendar in the House three times by Sensenbrenner, who argued it set a bad prededent.

Finally Proxmire slipped it into the continuing resolution Tuesday night. The Marforis, who were scheduled to be deported Oct. 10 unless the bill passed, are "exceptional people and have the attributes which would make them exemplary American citizens," he told the Senate.

He added that Ricky has recently "been stricken with a severe skin disorder which his doctor has diagnosed as stress-related. His uncertainty as to whether he will be forced to give up the only country he has ever known has been more of a burden than this 11-year-old can handle."

House members accepted the amendment with some grumbling in conference Thursday, but yesterday afternoon it was by no means certain that Sensenbrenner, who has bulldogged the Marfori issue for two years, would not object, thus setting up a confrontation with the Senate.

Patricia Tidwell, a Proxmire aide, said she expected Sensenbrenner to object. Then the bill might have returned to the Senate where, she said, the Senate would probably kill the amendment. "They're not going to fight to the death for Ricky Marfori," she sighed.

Sensenbrenner, backed by the House Judiciary Committee, was tempted to stand on principle. After all, he is an officially appointed "objector," a curious House institution in which the minority Republicans appoint watchdogs to make sure the Democrats do not slip anything by them.

Sensenbrenner's particular job for the past four years has been to "object" to questionable bills on the private calendar, a special schedule for bills dealing with individual matters such as immigration exceptions, personal claims against the government, minor real estate matters and waivers of import duties.

"This is a backroom deal, special interest legislation," Sensenbrenner said. "The precedent it sets is awful. Anyone who comes in to the States with their relations could then come to Congress and get permission to stay . . . . We could have 250,000 people coming in from the Philippines alone."

Nonetheless, Sensenbrenner, like other members of Congress yesterday, was anxious to leave Washington for the election recess and thought better of tripping up the funding bill over the Marforis. "There's not a lot of political sex appeal in this," he concluded philosophically.