The Army, confronted with strong community opposition, yesterday retreated from its plan to open a liquor store at Fort Myer, but it said that the Arlington post and one in Alexandria have been granted exemptions from Virginia drinking laws.

Arlington County officials, who had protested both proposals, said they were pleased that the store will not be built but remained upset that the base will continue to sell beer to young service personnel. Without the exemptions, Fort Myer and Cameron Station in Alexandria would have been forced, as of yesterday, to comply with the laws of Virginia, which is progressively raising its beer-drinking age to 21.

Lt. Col. John Myers, spokesman for the Military District of Washington, the command that oversees Fort Myer, defended the decisions. "We have heard loud and clear from the Arlington County Board, speaking for the community, and we're not going to push an issue that doesn't have the support of the community," he said of the liquor store.

Myers said that the Army had given Fort Myer and Cameron Station exemptions from a new Defense Department policy requiring compliance with local liquor laws because the District allows beer and wine sales to 18-year-olds. The exemptions do not apply to hard liquor because area jurisdictions prohibit their sale to individuals under 21.

The Army, he said, is "seriously concerned about soldiers going into the District, perhaps consuming too much alcohol and driving home drunk . . . . We want to provide an atmosphere where they don't see the need to drive" into Washington.

Lou Herzog, a retired Navy captain who is president of the Northern Virginia chapter of Mothers Against Drunk Driving (MADD), disagreed with the policy. "Those 18- and 19-year-olds are going to be drinking on base and driving off drunk and underaged," he said. "They're going to be picked up by the Virginia police, and we're going to insist that they be prosecuted to the fullest extent under Virginia laws."

Army officials revealed last week that they wanted to open a liquor store at Fort Myer to raise revenues for various social, library and recreational programs at the post, a block away from a Virginia liquor store.

"I'm pleased they agreed not to open the package store. I think it was the right decision for Arlington," said County Board Chairman John G. Milliken. "I'm disappointed they've chosen not to go with the Virginia law on the drinking age."

The two Army posts join many military installations in this area that have sought exemptions to a Defense Department policy that requires them to adopt state drinking ages unless they are within 50 miles or an hour's drive of a jurisdiction with a lower drinking age.

It was the District's more liberal laws that the Marine Corps' Henderson Hall, adjacent to Fort Myer, and other bases have cited in winning exemptions. If the District changes its laws, Myers said, the Army will "immediately reconsider" the exemptions.

Effective July 1, persons must be 19 in Virginia to purchase beer, and by 1987, the minimum age will be 21. In Maryland, 21 is the minimum for all alcoholic beverages.

Drinking among young servicemen has been a controversial issue in Arlington since a federal judge recently held the Army liable for damages growing out of a fatal 1981 traffic accident there.

In that case, District Judge Richard L. Williams said the officials at an Arlington Hall service club were responsible for the death because they served hard liquor to a 19-year-old enlisted man who was drunk and who under Virginia law should not have been allowed to buy any liquor.