The deposed shah of Iran's New York doctors could complete their treatment of him within four weeks and then declare that he can safely leave the country, medical sources said yesterday.

He still would need further cancer treatment, however. "Looking on him purely as a sick patient," these sources added, his doctors would prefer to treat and observe him "for some months."

These sources confirmed that the shah is gravely ill -- so much so that he would most likely die within a year without treatment, and may do so anyway. hA source personally close to the shah said yesterday that he is "riddled with cancer."

The medical assessments were made by physicians close to the New York Hospital-Cornell Medical Center team and Memorial Sloan-Kettering Cancer Center radiotherapists who are treating Shah Mohammad Reza Pahlavi with radiation for lymph gland cancer.

These sources drew a picture of a thin, weakened, yet determined patient who is "very uncomfortable about being here" and "might even even choose to leave in a week or 10 days, though this would be against his doctors' best advice."

If he decides to leave the United States shortly, there are only a small number of medical centers where he could get advanced cancer treatment equal to the best in the United States.

Almost all these are in Europe, in countries that have been even more careful than the United States in recent months to avoid jarring the new Iran, lest their supply of oil be stopped.

Of four nationally prominent oncologist -- cancer specialists -- questioned this week three thought the shah could get "equally first-class treatment" in London, Paris, Brussels, Milan "or a few other places." One insisted that "the best treatment is here."

But all mentioned the possibility that he could afford to fly specialists to Mexico or some other country to give him further chemotherapy and other treatment.

The 60-year-old shah's recent medical history began in 1973, when doctors first discovered that he had a form of lymphoma, or lymph gland cancer, called Waldenstroms' macroglobulinemia.

As lymphomas go, this is a fairly mild one, and French doctors are said to have found the shah "exquisitely sensitive" to chemical treatment.

About six months ago, after his exile, the shah's French doctors found a far more serious lymph gland cancer, a diffuse (or disseminated) histiocytic lymphoma.

On Oct. 22 he was flown from Mexico to New York Hospital. Surgeons there removed his gallbladder and several gallstones that had been blocking the bladder and common bile duct and causing pain and jaundice.

But the shah, it was also apparent, had a highly malignant and spreading lymphoma, with a swollen lymph gland or glands in the neck and armpits and a hugely enlarged spleen.

The New York Hospital doctors at first planned almost immediate chemotherapy with a combination of chemicals sometimes effective against even advanced histiocytic lymphoma. The lack of a properly functioning bile system made this more difficult, however, since this system usually plays a role in clearing these chemicals from the body.

It soon became apparent, too, that there was still another, unremoved gallstone in the bile duct. An attempt is being made to ease this stone out through a tube in the shah's abdomen.

The present plan, sources said, is to complete within two weeks the irradiation of the shah's neck, where his lymphoma has grown to a dangerous extent. This treatment began Monday at neighboring Memorial Hospital. The shah is secretly wheeled back and forth through a tunnel, under heavy guard.

Then sources said, he should have surgery to remove the remaining stone, unless other attempts to deal with it are successful, or unless he decides to have that surgery elsewhere and is well enough to get up and do so.