As students marched on his downtown office to protest President Reagan's proposed cuts in college loans and grants, Sen. John C. Danforth (R-Mo.) was telling local reporters, "I think the students are right."

Danforth regards himself as an enthusiastic supporter of Reagan's economic program, but he would shelve the third year of the tax cut, slow down the defense spending buildup and cut big benefit entitlement programs in order to reduce Reagan's budget deficits while protecting some popular domestic programs like student subsidies.

The next day, Rep. Richard A. Gephardt (D-Mo.) was visiting residents of low to moderate income neighborhoods on the other side of town, hearing their complaints and soliciting their responses to his ideas for reducing Reagan's deficits. But he avoided any direct criticism of the president or the major thrust of his program.

"People here still want to give him a chance to succeed . . . . They don't want to give up on him when he's got three more years to go," Gephardt said.

As Congress returns from its spring recess, starting with the Senate tomorrow, the two Missouri lawmakers will be on the front lines of the budget battle: Gephardt on the House Budget Committee, which will attempt to set overall spending and revenue targets, and Danforth on the Senate Finance Committee, which will handle taxes as well as proposals to save money from huge benefit entitlement programs.

Moreover, both are up for reelection this fall in a state where many people are pulling for Reagan to succeed, even as their complaints over various aspects of his economic program continue to mount in the face of deep recession and high interest rates.

Unemployment in Missouri exceeds the national average. Local thrift institutions are among the shakiest in the country. Some refineries are closing, close on the heels of auto assembly plants. But "people want him Reagan to succeed because . . . their jobs may depend on it," Gephardt said.

In their different ways, the lawmakers' response is to push, gently and dispassionately, for reductions in budget deficits that they regard as necessary for economic recovery without, as Gephardt put it, "savaging the president."

To the extent that both men are thoughtful, centrist politicians from a state that is often described as a political crossroads, their experience points up a dilemma for Congress as it returns: whether it has the leverage to push Reagan to compromise on his budget and, if he balks, whether it has the will to go it alone.

In any case, if there is a mandate for congressional rebellion, it has not been found by Danforth or Gephardt.

Two recent encounters between Danforth and his constituents help illustrate Congress' problem.

Two electrical contractors, accompanied by a representative of their trade association, approached the senator after a business leaders' luncheon in Kansas City last week. The economy, they told Danforth, is killing their business. What, then, should be done to Reagan's economic program, he asked. "Stick to it," they responded.

Danforth recalled an earlier episode after a basketball game at the University of Missouri in Columbia. "A woman rushed up, plucked at my sleeve and said, 'Cut down the deficit,' " Danforth recalled, still a bit bewildered at her passion over the deficit.

Ed Korte, a retired printer visited by Gephardt in a neat neighborhood of modest homes last week, summed up the problem for Gephardt and Danforth another way. Korte spoke warmly of Reagan, saying, "I think the poor man's got an awful job, and nobody tries harder." But he said he opposed many of Reagan's budget cuts and didn't like the idea of huge deficits. Korte's prescription was to "cut down some of this stuff we're giving away . . . and save the programs we need." As Danforth and Gephardt see it, people are not entirely clear about the connection between budget deficits, interest rates and economic recovery but have a growing sense that deficits are destructive to the economy and must be reduced.

They are willing to make some sacrifices to bring down the deficits as long as they perceive that the sacrifices are fair, Gephardt contends. Moreover, it was apparent from three days of conversations with dozens of people in the state last week that they want Congress to do something about the economy and are likely to hold it responsible if good results are not achieved.

But, as Gephardt put it, "They say, 'Work with him on it; he's our president.' They tend to see anything a Democrat does as being against him. People don't like a lot of jousting. They think it's not being constructive."

Said Danforth: "People don't think the budget numbers are right, but they think he's moving in the right direction . . . . There's certainly not such an outrage that people are going to start marching with a pitchfork on every courthouse."

Danforth offers another explanation to back up his contention that people haven't given up on Reagan, despite his increasingly poor showing in nationwide polls.

"People like Reagan . . . but they also want their presidents, whoever they are, to succeed. They're tired of seeing their presidents torn down, one after another. It's gotten so we have planned obsolescence for our presidents in one year. People don't want that," said the senator.

Danforth and Gephardt are talking in terms of budget changes that are being negotiated by congressional leaders and White House chief of staff James A. Baker III, including tax increases, entitlement cuts and trims from the administration's proposed defense spending increase. Reagan has not agreed to any details of the evolving compromise, and the two Missouri lawmakers concede it probably cannot get anywhere without the president's backing.

On the issue of tax increases, Danforth says he has found little resistance to the idea of deferring the 10 percent tax cut scheduled for July, 1983, or making it conditional on improvement in economic conditions.

Similarly, he said, most people don't object to modest defense cuts, largely on the assumption that there's bound to be some waste whenever that much money is spent.

Two months ago he asked a group of 90 middle-management people at a St. Louis high-technology medical manufacturing firm whether defense spending could take some cuts. Only one said no, he recalled. "No one wants to gut the Department of Defense," Danforth said, "but there is a very strong feeling that it shouldn't get a blank check."

Danforth is skeptical about whether cuts can be made in inflation adjustments for Social Security, which are regarded as the key to major savings from benefit entitlement programs. But Gephardt has found that even Social Security recipients themselves will go along if the issue is explained with care.

Gephardt, who looks like everyone's favorite grandson grown up to be a congressman, proved it at a luncheon gathering at the Bevo community's senior citizens center one day last week. He told members of the audience that he is thinking of a cut of 1 or 2 percentage points from the annual inflation adjustment for Social Security, which is pegged to the consumer price index, as part of what he called "shared sacrifice" by all taxpayers. Would they agree? All but a scattered few raised their hands in agreement.

Despite Danforth's repeated assertions that Missouri agrees with the basic thrust of Reagan's program to cut back government and revitalize the economy through tax reductions, there were mixed signs as he moved about Kansas City and St. Louis last week.

For instance, when he asked eight St. Louis exporters whether they thought Reagan was headed in the right direction, only one offered audible dissent, objecting to the deficits and military expansion.

But when he asked the same question of a larger group of professional women, they said no by a show-of-hands vote of 14 to 6. They complained mainly about priorities, including emphasis on defense over domestic programs and both the equity and efficacy of the tax cuts.

There are mixed signs as well regarding the effects of last year's budget cuts and how they affect Reagan's standing with the public. For instance, the neighborhood senior citizen centers that Gephardt visited are barely making ends meet, but meals continue to be served. Some people who are losing jobs are going on welfare, which, ironically, adds to the very government costs that Reagan wants to bring down, Gephardt noted.

"The results of the 1981 program cuts are not as visible as I thought they might be," Gephardt said. "People are willing to make sacrifices, but it's going to be a lot tougher on him Reagan if the sacrifices don't produce results."

About the only satisfaction that Danforth and Gephardt can glean from the upcoming elections is that they aren't running against each other.

Gephardt seriously considered challenging Danforth for the Senate seat but abandoned the notion for a number of reasons, including the probable expense of a campaign against the wealthy Ralston Purina heir, who is already talking about spending $2 million in a campaign for a second six-year term.

Both are regarded as early heavy favorites for their respective reelection campaigns, but neither is taking any chances.

Gephardt contends that, despite the upbeat talk about Democrats' chances in the mid-term congressional elections, he feels harder pressed by the general political climate this year than he did in the Reagan sweep year of 1980. "Discontent, frustration, anger at the way everything is going, one calamity after another," Gephardt observed glumly.

The best measure of this year's uncertainties, however, may well be Danforth's campaign kickoff plans: a 10-day helicopter trip that involves 114 visits to Missouri's 114 counties. And that is before he even gets a Democratic opponent.