Ronald Reagan, a politician some Republicans believe dreams are made of, is causing some restless nights for the moderate Republicans of Maryland.

With his old-fashioned conservatism and movie-star looks, Reagan cuts a hero's image among the small-town merchants and rugged farmers who form enough of the party's mainstream to assure a big Reagan win in the state's presidential primary May 13.

But more moderate voices in the party establishment know the perils of preaching to the converted and then losing the church. For them, an easy primary victory for the California conservative spells sure doom in November's general election.

Underlying this thinking is the historic dilemma of the Republican Party of Maryland -- or, as Republican State Sen. John J. Bishop calls it, "our tragic flaw."

The flaw is that the type of candidate Republicans like to nominate for statewide office is too conservative for the taste of Democratic voters. That is fatal in a state with a 3 to 1 Democratic edge in voter registration. t

There have been significant exceptions, of course, such as U.S. Sen. Charles McC. Mathias and the late Gov. Theodore R. McKeldin, who continued to win elections and maintain popularity despite the GOP party label.

Those men represented liberal and moderate positions, the kind of philosophies that helped them win favor with Democrats and at the same time prompted Republican cries of betrayal of party principles.

"When you're dealing with Republicans," said Republican state delegate Luiz Simmons, "you're dealing with a narrower universe of people. That hurts candidates who are looking for statewide appeal."

Take 1964, for example, the year Barry M. Goldwater, the conservatives' Everyman, ran as the Republican nominee for president. He lost so badly in Maryland that he brought down most of the state GOP candidates who ran on his ticket, including incumbent U.S. Sen. J. Glenn Beall.

The lesson of 1964 has not been lost on the Republican middle-of-the-roaders of today.

First, many state moderates -- including Simmons, Montgomery State Sen. Howard Denis and Anne Arundel County Executive Robert Pascal -- joined forces with Sen. Howard Baker. They felt he was sufficiently moderate to succeed in Baltimore's large black population and the bedroom suburbs of Washington while sufficiently conservative on fiscal policy to hold onto the GOP mainstream.

Other well-known Republicans, such as former U.S. Sen. J. Glenn Beall Jr. and U.S. Rep. Marjorie Holt, threw their support to George Bush, and his stock began rising after winning the Iowa caucuses in January. b

When Baker quit the race and Bush faltered in several other primaries, the moderates began clamoring for former, President Gerald R. Ford, who beat Reagan in the Maryland primary four years ago before losing the general election to Jimmy Carter.

When Ford declined to run for reelection last week, the enthusiasm moderate Republicans displayed when the field was full of their favorites suddenly turned to despair.

"You keep jumping from one horse to the other and the horse drops dead from under you," explained Denis. "You get discouraged."

Pascal, a flamboyant former Democrat who continues to attract a large Democratic following, says he is so tired of choosing candidates who end up withdrawing that he plans to stay neutral in the contest for Maryland's 30 delegates.

What remains is a three-way race, at least in name.

Bush, the former CIA director, party chairman and U.S. ambassador to the United Nations, has put together a good organization, but political handicappers believe his poor showing in earlier contests and his failure to strongly articulate his conservative views will hamstring him.

"Bush is becoming the asterisk he once was," Denis remarked. Another Republican observed that Bush "tries to say the same thing as Reagan, but he just can't get it out. You take the guy who articulates better."

Bush's campaign supporters nevertheless continue the fight, settling on a strategy they believe can stop Reagan by reminding Republican voters of the party's nagging nightmare -- a sure win in May is sure loss in November.

"George Bush," said his field director, Dorann Gunderson, "is the only real alternative."

Finally, there is John Anderson, the Illinois congressman, a liberal candidate facing a state party with a minuscule liberal constituency. Although he has attracted Democratic voters in other states. Maryland does not allow party crossovers.

Anderson's liberal credentials, especially his pro-civil rights voting record, could make him a stronger candidate than Reagan in the general election, but his primary prospects in the conservative GOP seem little better than quixotic, party officials say.

"I'm not interested in making a futile gesture at this point," explained Simmons, who said he agrees philosophically with many of Anderson's positions but sees little reason to back a probable loser.

That leaves Reagan, the two-term California governor, who boasts of his power to draw substantial Democratic votes in his home state, but who has had little luck convincing the Republican moderates of Maryland.

Moderate Republicans have self-interest in mind as much as principle in fearing a Reagan candidacy next fall. With the conservative one-time movie star at the top of the ticket, he could endanger everyone below, according to their thinking.

Sen. Denis, for instance, fears the impact of a Reagan nomination on the comeback effort of former U.S. Rep. Newton Steers, a liberal Republican who is running in Montgomery County. "Reagan could lose the state and take everybody with him," said Denis.

"When you're a Republican," Denis continued, "you don't look for coattails. But you hope that the top of the ticket won't hurt you."