RICHMOND, AUG. 31 -- Virginia Lt. Gov. L. Douglas Wilder, pointing to last week's announcement that the state has a $154 million budget surplus, plans to lead a drive during the 1988 General Assembly to repeal the sales tax on nonprescription drugs.

The proposal, to be spelled out at a news conference Wilder has called for Tuesday, flies in the face of advice from Gov. Gerald L. Baliles, offered when he unveiled the budget surplus, that legislators not be "stampeded" into backing proposals either to refund part of the money or spend it for pet projects.

Exempting nonprescription drugs, such as cough medicine, aspirin and other over-the-counter remedies, would cost the state about $30 million a year, the state Department of Taxation has told Wilder.

"It's a question of basic fairness and equity," said Joel W. Harris, Wilder's executive assistant, who confirmed Wilder's plan. "The lieutenant governor doesn't think sick people should have to pay a tax to get well."

Wilder's action has political overtones, because it puts him on record on a politically popular issue in advance of his likely opponent for the Democratic gubernatorial nomination in 1989, Attorney General Mary Sue Terry.

An aide to Terry said tonight that "it's a matter for the governor and the legislature to decide."

Harris informed Andrew B. Fogarty, Baliles' chief of staff, of the proposal in a meeting late this afternoon, but Fogarty said later it was uncertain that he would be able to inform Baliles before the news conference. Baliles is attending the Southern Governors Association's annual meeting in Louisville.

Baliles and Wilder clashed last year when the lieutenant governor took positions contrary to Baliles' but did not tell him about them before going public.

Wilder raised the idea of a tax credit or exemptions last October, when he criticized a half-cent increase in the sales tax devoted to transportation that the legislature had approved during a special session. If sales taxes are going to be used to finance highway projects, Wilder said, the poor should get exemptions on necessities.

At the time, Wilder was criticized for waiting until after the tax had been ap- proved before speaking out. Del. C. Richard Cranwell (D-Vinton), who had supported such an exemption for the poor during the special session, said "it seems to me he's about two weeks or 10 days late."

Wilder tipped his hand on his latest move in a speech Aug. 22, two days before the official surplus was reported, when he said "state government should not keep any of what some refer to as the windfall" in state tax revenue resulting both from the state's strong economy and from changes in the federal tax law that encouraged investors to sell some assets and pay taxes on the transactions before last Dec. 31.

But Del. Warren G. Stambaugh (D-Arlington), the author of legislation that was designed to assure that the state pass any windfall on to its taxpayers, said none of the $154 million can be attributed to changes in the federal tax code. That surplus will not show up until next year, Stambaugh said.