Rejecting a legal opinion from a state assistant attorney general and the advice of its own staff, the Virginia State Water Control Board voted unanimously to give a higher funding priority to a controversial sewer project in Fairfax County.

The board, in a 7-0 vote last week, agreed to take the Dulles-Herndon-Reston pumpdown out of category D - the lowest funding priority - and put it in category B. The shift greatly enhances prospects that the $20.4 million sewage-diversion project sought by Fairfax County will get federal sewerage funds. The water control board - which distributes such funds - decided to earmark $14.4 million for the pumpdown in its decision last week.

Under pressure from court orders to provide sewage treatment in the developing northwestern part of the county, Fairfax wants to build the pumpdown so it can divert sewage from the pipeline to the Blue Plains treatment plant in the District to the Lower Potomac plant in the southern part of the county.

But Assistant Attorney General Frederick S. Fisher, in a letter to the water control board last week, said there was no legal justification to move the pumpdown to a higher priority rating for federal aid. Fairfax County has argued that the higher priority was necessary because the pumpdown must be built by 1979 to avoid a sewerage moratorium in the Herndon-Reston area by 1980.

In general language, Fisher took exception to the county's estimates of need, which were based on current building permit patterns. In more specific language, the water control board's staff, in opposing a higher priority for the pumpdown, said the project was not needed as soon as 1980.

The project was conceived as an answer to a Fairfax Circuit Court decision ordering the county to provide future sewer capacity for Reston and Herndon. Controversy erupted, however, when the county sought to have the water control board give the pumpdown a higher priority than another diversion project-pumping sewage from two old plants on the Potomac to the Lower Potomac plant, which is being enlarged and upgraded.

In an elaborate display of bureaucratic parrying, the state board had actually suggested to the Fairfax supervisors that they could "optimize" funding for the pumpdown by requesting that the project be moved up in priority. The state board apparently made the suggestion because Fairfax officials were indicating the pumpdown had to get started as quickly as possible.

But critics of the shift in priorities said the other diversion project - labeled the pumpover - was more urgent because it would handle sewage already being generated. The pumpdown, they contended, was for future flows.

Last fall, the supervisors decided to ask the water control board to give the pumpdown a higher priority. But at the same time, in an effort to placate critics, they appropriated $1.2 million in county funds to get the pumpover started.

But on June 1 Assistant Attorney General Fisher informed the water control board and Fairfax officials that the pumpdown should stay in category D, below the pumpover. He said there was no justification to shift it to category B.

Fisher said category B was limited to projects already under way, and that the pumpdown was a new project. The pumpover is considered an existing project because a link has already been constructed.

Chairman John F. Herrity said the issue over which project should be funded first is probably moot. He said both projects may be funded at roughly the same time. That would happen, he said, because the state water control board will make funding decisions for two years within a matter of months becaue of the delay in congressional appropriation.