Supreme Court Justice Lewis F. Powell Jr., at 77 the court's third-oldest member, was reported in fair condition yesterday in a Rochester, Minn., hospital after surgery for cancer of the prostate gland.

Powell's "prognosis is excellent," court press officer Toni House said in a brief statement. Powell, one of five high-court justices older than 75, was expected to be hospitalized for 10 to 14 days.

House said the cancer was detected in a "recent routine physical operation," but declined to elaborate.

Powell, accompanied by his wife, Josephine, entered the Rochester Methodist Hospital Thursday for testing, according to a spokesman for the Mayo Clinic, which is affiliated with the Methodist hospital. The operation, performed by his doctor, David Utz, began yesterday morning and lasted several hours, the spokesman said.

She would not say how much of Powell's prostate gland was removed or whether the cancer had spread to other organs.

Cancer of the prostate is the most common cancer in older men; nearly all males who reach the age of 80 have small amounts of cancer in the prostate gland. Often it requires no treatment because its rate of growth is slow and it tends to remain localized. If the cancer is detected in its early stages, it is usually curable.

Surgery often is not attempted when the cancer is extensive locally or has spread through the body.

Powell, who recently underwent a cataract operation and had surgery in 1981 for a bowel tumor, is expected to return to the bench next month, House said. But he will miss oral arguments in 24 cases scheduled this month.

House said that Powell, who could be a pivotal vote in several of those cases, has the option of participating in some or all of them by listening to a recording of the oral arguments. Otherwise, those cases will be decided by the court's remaining eight justices.

Powell, a wealthy attorney and former school-board member in Richmond, came to the court in 1972. For years he was a member of its moderate group. But with the court more polarized, Powell has become a crucial fifth vote in criminal-case rulings and is expected to be a major influence this year in cases involving the relationship between church and state.