Republican Rep. Stanford E. Parris, reacting to a recent poll that shows President Reagan's popularity slipping in his Northern Virginia district, is trying to put some distance between himself and the administration in his campaign rematch against Democrat Herbert E. Harris II.

The strategy represents a significant shift for Parris, who formed a Committee for Economic Recovery last year to promote Reagan's policies. A poll taken for Parris last month showed that his lead over Harris increased by two percentage points since August, while Reagan's favorable rating in the 8th District fell from 72 to 59 percent.

"We are working very hard to show that Stan is an independent congressman," a Parris spokesman said this week. The congressman will try to portray Harris as a free-spending liberal and focus as much attention as possible on the Democrat's six years in Congress rather on Reagan's first two years.

Harris's campaign spokesman said that the former Democratic congressman, who beat Parris in 1974 and then lost to him two years ago, will focus his campaign on Reagan's economic program and Parris's support for it. "Stan's got to defend it or apologize for it," the Harris spokesman said.

Parris and Harris are contesting a district that follows the Shirley Highway and Interstate 95 from Alexandria south through Fairfax, Prince William and Stafford counties. Like Northern Virginia's other congressional district, the 10th, represented by Republican Frank Wolf, the 8th District is viewed by both parties as a seat that could go either way in November.

Harris and Parris have attacked each other with considerable flair in past campaigns, and more than 95 percent of those interviewed in Parris's poll were familiar with both men. Neither candidate has any announced opposition for his party's nomination.

The telephone survey of 400 registered voters was conducted for Parris between Feb. 10 and Feb. 14 by Robert M. Teeter's Market Opinion Research Inc. and showed Parris leading Harris 50 to 39 percent, with 11 percent undecided or declining to respond. Spokesmen for both candidates said the lead, while encouraging for Parris, was by no means overwhelming, and both campaigns predicted the race will be close.

Harris has hired pollster Peter Hart but he declined to disclose any results.

The Parris poll showed the Republican incumbent leading among all voter groups except nonwhites, who made up 7 percent of the sample and favored Harris 49 to 44 percent. Nonwhites make up more than 10 percent of the district's population, but a Teeter spokesman said a smaller percentage is registered to vote.

Almost four out of every 10 households surveyed contained at least one federal employe, whose support Harris seeks because of supposed dissatisfaction and anxiety about government cutbacks and layoffs. Those federal workers surveyed favored Parris by a 49 to 42 percent margin.

"We have worked very hard in this office to demonstrate to the federal worker that Stan will fight for their interest," a Parris spokesman said. "He has said repeatedly that the Reagan administration has been insensitive to the impact of his policies on federal workers."

While supporting the basic elements of Reagan's program, Parris is now repudiating aspects of the tax act approved last year, such as the provision allowing profitable companies to buy tax deductions from less profitable firms, and blaming them on Democrats in the House. Harris will make the repudiation as uncomfortable as possible.

"Stan voted for the tax breaks, and the benefits to these companies in the past year have been tremendous," a Harris spokesman said.

The poll contained some good news for Parris besides his lead. He was seen as far more conservative than Harris by respondents, who generally described themselves as moderate or conservative, and he was also seen as more likely to help reduce inflation, balance the budget and strengthen the national defense.

Harris, on the other hand, was seen as friendlier and more concerned with the problems of the average citizen.