Major Marion Barry, who moved to Ward 7 east of the Anacostia River last year with hopes of establishing a base of support there, has been a wallflower at the first big political ball in his new neighborhood -- the hotly contested Democratic City Council primary.

The reason for Barry's reclusiveness, according to District Building sources, is that the major fears he lacks enough clout in the ward to put any candidate over the top. Barry's chief operatives in the ward have warned him, according to the sources, that any candidate he endorses might actually be harmed by the mayor's public support.

"Marion just doesn't need that kind of loss," said one source close to the mayor who asked not to be identified. "He decided it would be better just to sit this one out."

Barry has said privately, according to friends, that of the two major candidates he prefers realtor H.R. Crawford to legislative aide Johnny Barnes. The reason, sources say, has less to do with what the candidates stand for than with the nature of their political allegiances.

Barnes works on Capitol Hill for D.C. Del. Walter E. Fauntroy. Fauntroy, in turn, has connections to two D.C. politicans who have opposed Barry in the past and are being mentioned as potential opponents in the 1982 mayor's race -- City Council Chairman Arrington Dixon, and Assistant Secretary of Housing and Urban Development Sterling Tucker.

Fauntroy and Dixon, both of whom have endorsed Barnes, likewise both backed Tucker in the 1978 mayor's race.

Crawford, on the other hand, supported former Mayor Walter Washington in his bid for reelection in 1978. With no real ties to Tucker, Dixon or Fauntroy, Crawford could be more acceptable to Barry on the council, sources said.

"He [Barry] figures H.R. [Crawford] would be closer to him since Johnny [Barnes] is lining up with all those [other] folks," said an official who has discussed the race with Barry.

The official added that Barry decided not to make a formal endorsement primarily because he felt he could then become a major issue in the campaign and open himself to charges of "bossism."

That allegation was leveled at Barry last November when he backed a slate of candidates for the D.C. School Board. "Marion still feels some "bitterness" over those charges, a top aide said.

The ward, which occupies the far eastern corner of the city both north and south of Fort Dupont Park, has proved sensitive to the "bossism" issue: Barnes' top campaign workers privately concede that the major problem they have had is in convincing voters that Barnes is not running purely at the behest of the more powerful officials who support him.

Another element is the fact that in 1978, the ward was won by Walter Washington, not by Barry. Sources said Barry has not yet developed the kind of political base he wants in the ward. In addition, Barry has suffered political problems citywide, many of them resulting from his handling of the city's budget crisis. Critics have attacked service cutbacks ordered by Barry, as well as the administration's slowness in coming up with a definitive figure on the extent of the problem.

A candidate in another primary race who is using a telephone bank to contact voters said most frequently volunteered response is criticism of Barry.

A high-ranking Barry aide said the mayor also feels some ambivalence about the race: politically, it would make sense to back Crawford, but Barnes' positions on issues are close to Barry's own.

Barry said in a telephone interview last night that he believed endorsing a candidate would only threaten to fracture his own base of support, since he has at least a few supporters in all camps and would like to draw more.

"I've been advised by the people in Ward 7 who support me not to endorse anybody," he said. "It's not as if the people don't have a choice. The candidates are certainly worthy. It's not an issue that I need to split my base over."

Barry denied that he was concerned about charges of bossism, and said he has a "strong organization" in the ward. "I'm right where I want to be in Ward 7," he said.

Despite Barry's hands-off policy, the political aspects of the race as they affect the mayor have filtered down to Barry's troops in the ward and most of them are favoring Crawford, though there are few signs of enthusiasm.

Lorraine Whitlock, a member of the Democratic state Committee and Barry's top worker in Ward 7, carefully has maintained neutrality in the contest. She reportedly was one of the persons who warned Barry to stay out of the race.

Sources close to Whitlock, said she has indicated she will probably vote for Crawford, rather than Barnes, but in the words of one, "she isn't wild about either of them, to tell the truth."

Crawford has been endorsed by the Gertrude Stein Democratic Club, the most active gay rights group -- traditionally a Barry constituency. Homosexual activists have become an active force in D.C. politics, and their backing can provide a campaign with energetic workers.

"I don't think anyone was enthusiastic about backing Crawford," said an official of the club, "but the argument essentially was that he [Crawford] is on the Barry team and Barnes is on the other side."

Many Stein Club members actually were more impressed with the third candidate in the race, Emily Y. Washington, according to the official. But they figured that Washington, operating on a shoestring campaign budget, could not win and decided to go with Crawford.