The principal American doctor of the former shah of Iran said yesterday his lymph gland cancer has probably spread and he will soon undergo a "hazardous" operation to remove his swollen spleen, the site of the apparent spread.

The operation will likely be done at Paitilla Hospital in Panama City, it was learned. Neither the site nor time was announced -- "for security reasons," the ex-shah's aides said -- but the probable site was widely known in Panama yesterday. Washington and Panamanian sources called the operation either an "emergency procedure" or "one that can't wait long."

The 60-year-old former shah is "a seriously ill man and that's it," an aide said. The principal American physician, Dr. Benjamin H. Kean, said in New York that he has severe anemia as a result of the spleen disability.

Whether the enlarged spleen and anemia are due to a spread of cancer or to some other cause -- possibly a milder lymph gland disease the shah first developed six years ago -- will not be clear until after his surgery.

Ideally, said medical sources, the operation should be done in a major medical center like New York Hospital-Cornell Medical Center, where the ex-shah was treated from late October to early December.

However, a State Department spokesman announced, "The shah has no plans to come to the United States."

Actually, the shah would like to return to the United States for treatment, but realizes it is politically impossible as long as American hostages are held in Iran, sources said.

His second choice, they added, was Gorgas Hospital, operated by the U.S. Defense Department in the former Canal Zone.

But State Department officials reportedly told the ex-shah's representatives that treating him in a U.S. government facility might further inflame the hostages' captors.

Paitilla Hospital, expected site of the operation, "is an excellent one and better for the purpose than Gorgas, which is now less than half filled," said a respected Panamanian doctor who declined to be named.

"Paitilla Hospital has very top doctors, and the shah has already been there for checkups," this doctor added.

A team of American doctors has already been selected to work with Panamanian doctors who have already examined the shah. But exactly who will be in charge at the operating table was not announced.

Kean -- professor of medicine at Cornell Medical College and the doctor who flew to Mexico last fall to arrange for the shah's American treatment -- said yesterday that he met in Panama last week with Dr. George Flandrin and Panamanian physicians.

Flandrin, who is French, began treating the shah in 1974 for a mild cancerous form of lymphoma called Waldenstrom's macroglobulinemia. That disease apparently turned into a sometimes rapidly fatal cancer, a diffuse histiocytic lymphoma, by the time the shah reached New York last October.

The shah was treated in New York for gall bladder disease and gall stones, and got a series of radiation treatments for his lymphoma.

He left New York for a Texas Air Force base on Dec. 2, then flew to Panama to take up residence on tiny Contadora Island on Dec. 15. He arrived in Panama looking haggard, then improved. "He was playing tennis with some tourists two or three days ago," a U.S. Army public affairs officer told a reporter Monday.

But yesterday Kean said, "The shah has a massive splenomegaly" -- enlarged spleen -- "and severe degrees of anemia, leukopenia and thrombocytopenia," or low red blood cells, white cells and blood platelets.

"It was the consensus," Kean continued, "that the proper diagnosis was hypersplenism probably associated with a tumor in the spleen.

"After careful consideration, all agree that a splenectomy is necessary and that major hematologic support" -- supplies of blood and experts to provide it -- "during and after operation is mandatory. Plans are being made to provide this support, and arrangements for the operation are in progress."