A federal judge yesterday said Prince George's County can sell two unused schools that he had previously ordered retained in case they were needed to restore racial balance in the school system.

Reversing his earlier ruling, U. S. District Court Judge Frank Kaufman said the Surrattsville elementary and Suitland special center schools can now be sold, but that the school board cannot dispose of the 12 other schools that it closed last spring.

Kaufman had banned the sale of the schools last October, saying they might be needed "to preserve flexibility" if a new desegregation plan is ordered in a suit before him that is scheduled to go to trial May 3.

The NAACP brought the action last year, charging that the school system, one of the 10 largest in the nation, suffered from racial imbalance.

Kaufman agreed to the sale of the two schools after attorneys for the NAACP agreed to allow the school board to sell them. "We didn't feel they were so critical to any relief," said Joseph Hassett, a lawyer for the NAACP.

During a closed session pretrial conference yesterday, Kaufman ruled that the state board of education and the Prince George's County government will not be considered defendants in the suit unless the NAACP brings a claim against them during the trial.

The school board had sought to have the county and state board named as additional defendants.