A year ago, when Maryland legislators combed through the welfare budget hunting for fat, they looked favorably on a $5 million program for mothers of students between the age of 18 and 21. Back in those comparatively prosperous days, it seemed wise for the state to encourage poor youngsters to complete their educations.

This year, a House budget subcommittee took a long, painstaking look at the same program, and voted to do away with it, a recommendation that in effect would drop 6,000 high school, technical school and college students from the welfare rolls this year.

The turnaround had little to do with the philosophies of the delegates on the subcommittee; in fact, some who supported the cut describe themselves as "liberal." Rather, the legislators say, it signals a new kind of politics that they expect the Reagan administration to force on Maryland and other states sooner or later.

"We rejected this cut last year, and people were calling us 'insensitive' back then," muttered Del. Howard P. Rawlings (D-Baltimore) as he cast the sole vote against the proposal, labeling it "irresponsible," and contending that it would increase the already high dropout rate among ghetto youths.

The proposal was forwarded today to the full House Appropriations Committee in a subcommittee report calling for the largest retrenchment of welfare in Maryland that legislators can recall -- in all, $9 million of cutbacks that officials say would reduce or eliminate assistance to as many as 27,000 of the 143,000 children in Maryland's welfare families.

"If these proposals die this year, they'll keep coming up, and they'll be with us next year. So we have decided to raise them as a political question," said Del. Nancy Kopp (D-Montgomery). "In the total context of who, among all the eligible people, is going to get enough money to live on, I think this is justifiable."

Kopp, who as chairman did not vote on the proposals, said she opposes them in principle, but has made peace with them in light of the state's fiscal problems and the financial jolt that she and others anticipate from federal budget cutbacks next October. In fact, subcommittees examining the budgets of other state programs are expected to propose much deeper cuts than Kopp's panel did.

"After October, the impact is going to be so immense and so traumatic that this is going to seem like a very low-key prelude," she said. "It's going to seem like peanuts." Maryland officials expect to lose $175 million if all of Reagan's proposals take effect, with more than a third of the losses coming from welfare and other poverty programs.

The half-billion dollar budget of the Department of Human Resources, which administers welfare and other social programs, is now being buffeted between competing political philosophies about how Maryland should prepare for the Reagan cuts. The full House Appropriations Committee will vote on the subcommittee's proposed cuts this week, and they will reach the House floor Tuesday.

In the Senate, however, the subcommittee that oversees DHR is expected to reinstate some of the welfare and social programs recommended for cutbacks, if the full House approves the reductions. The proposed changes would have to be approved by both houses and signed into law by Gov. Harry Hughes before taking effect.

Meanwhile, there is sentiment in some quarters of the House Appropriations Committee to force even deeper cuts than Kopp's panel recommended, to build a cushion against federal reductions. DHR Secretary Kalman R. Hettleman said he fears the legislature may be trying to "out-Reagan Reagan."

There are all kinds of arguments for these programs," said Del. Charles J. Ryan (D-Prince George's), the subcommittee vice chairman. "But these are not areas of primary survival needs. We're down to that now. We have to make tough decisions this year -- philosophy aside."

The $5 million cut in student coverage was the largest recommended by the House subcommittee. Under the Aid to Families with Dependent Children program, Maryland pays welfare mothers an allowance for children between the ages of 18 and 21, if they stay in school. The subcommittee has recommended cutting off assistance at age 18, which would affect 6,000 students -- about 2,000 of them high school seniors, officials said.

In the past, officials and legislators have viewed this as a "preventive" program that keeps the children of welfare families in school or training programs long enough to prepare them for the job market.

The subcommittee also recommended jumping one step ahead of Reagan by adopting one of federal budget director David Stockman's proposals before Congress votes on it. Under that proposal, the state would count a stepparent's income when calculating the needs of children whose mother or father has remarrried. State officials estimate that this measure, if enacted, would reduce assistance to between 7,000 and 21,000 children, depending on how the policy is drafted, saving $3.7 million in state and federal funds.