Pope John Paul II signed a new code of canon law yesterday that will govern the ways 735 million Catholics around the world practice their religion into the 21st century.

The new code, ordered by pope John XXIII exactly 24 years ago, reflects two decades of turmoil in the Roman Catholic Church. It outlines the rights of clergy and lay people for the first time and includes a recommendation that church courts be set up to hear complaints, even against bishops.

But, in provisions that have special interest for 49 million American Catholics, the new code ends an experiment that had streamlined marriage annulments here, it retains automatic excommunication for abortion, and it continues to bar priests and nuns from political office without authorization from their bishops. It opens up more leadership roles for women, but not ordination or steps viewed as leading to it.

Church experts and lay observers generally welcomed the new document as an improvement over the old code, but it also ran into criticisms that it does not meet the intent of the church reforms leading up to it.

During a 10-minute ceremony at the Vatican, the pope said the new code of 1,752 canons, or laws of the church, will go into effect on Nov. 27, the first day of Advent. Venezuelan Archbishop Rosalio Jose Castillo Lara, chairman of the Vatican commission that made the revisions, said the 10-month delay is a "grace period" to allow bishops and priests to study the revisions, which are binding on Catholics around the world.

The product of 17 years of work by a Vatican commission of 74 cardinals, bishops, theologians and canon lawyers, this is the first revision of the church's laws since the original code was compiled from scattered church laws in 1917. It will affect Latin Rite Catholics only. Eastern Rite Catholics, such as Ukrainian Catholics, have separate canon laws.

Many of the laws in the new code are already familiar to Catholics. The code incorporates the sweeping changes in the church already in effect since Vatican Council II, the worldwide gathering of Roman Catholic bishops that modernized the church in the mid-1960s. Reforms ranging from changes in the mass to the institution of new ministries such as the permanent diaconate, an ordained ministry open to either married or single men, are now part of the new code.

Changes in society have weeded out other laws. One of the canons dropped from the 1917 code, for example, barred priests from hunting with hounds. The new code drops a ban against membership in the Masonic order, which at one time was charged with anti-Catholicism. It also drops the old code's prohibition against cremation when the reasons are not opposed to Christian faith in resurrection. The original law had stemmed from attempts by the church to combat pagan practices.

Aspects of the new code can be outdated over the years by new laws. But its tone also reflects an overall church philosophy that will guide Catholicism for decades. The code follows nearly two decades of turmoil in the church; it attempts to focus on an evolving church made up, as defined by Vatican II, of the entire "people of God." As a result, there are fewer laws--the old code had 2,414--and they are less rigid and less punitive than the old code's.

The number of offenses bringing automatic excommunication has been cut from 37 in the old code to six in the new. Aiding in or having an abortion was retained. The others are violation of the seal of confession, absolution by a priest of his accomplice in an illegal act, illicit ordination of a bishop, physical violence to the pope and profanation of the consecrated holy communion host, which Catholics believe is the body and blood of Christ. An excommunicated Catholic is not permitted to receive any of the sacraments, including Holy Communion, until he repents to a priest.

The code also drops eight of the 10 required holy days of obligation, or days when Catholics must attend church, that had been set by the old code. The two remaining in the new code are Christmas and a feast day commemorating Mary. National church bodies, such as the National Conference of Catholic Bishops in the United States, may add their own choices to these.

The code drops the ban in the old code that prohibited Catholics from attending religious services of non-Catholics other than weddings and funerals. It also drops old canons that banned sharing of the sacraments with non-Catholics--in the new code, under emergency conditions, Catholics may receive penance, Holy Communion and anointing of the sick from non-Catholic clergy and non-Catholics may receive them from Catholic priests. The new law is expected to apply particularly to relations with Eastern Orthodox Christians.

The ban against priests and nuns holding political office continues a similar ban in the old code. Also continued is a ban against them leading union activities. Both areas are permitted when authorized by their local bishops.

The final version of the new code has been worked on by the pope and a small group of advisers since last fall. Its precise wording was still not known yesterday, although observers did not expect substantial changes from the last draft finished in October 1981.

Archbishop John R. Roach of St. Paul and Minneapolis, president of the National Conference of Catholic Bishops in the United States, yesterday called the new code "a major simplification and streamlining" that makes it a "more practical, workable" document than the old. It "incorporates," he said, "the insights and provisions of the Second Vatican Council."

"It not only codifies present practice, but incorporates the decisions of the Second Vatican Council into organizational life," the board of governors of the Canon Law Society of America, an organization of 1,700 canon lawyers and others involved in church law, said in a statement yesterday.

But others charged that the code falls short of meeting the intentions of Vatican II. One Jesuit canon lawyer, the Rev. Ladislas Orsy, called it "a compromise."

"It's got strengths and weaknesses," said the Rev. Frederick R. McManus, a canon lawyer and vice provost and dean of graduate studies at the Catholic University of America. "There was a tremendous influence of the Second Vatican Council on the code of canon law--it could have been greater."

The Women's Ordination Conference, an organization of 1,500 Catholics working for women's ordination and decision-making roles for women in the church, said in a statement yesterday that the code, while removing some laws from the old that presented women in "an inferior, dependent and passive condition," still did not give women decision-making powers, particularly because of its denial of ordination to women. "Men are still making judgments and decisions for and about women," the organization stated.

The code still limits the priesthood to men. As a result, women will continue to be excluded from key authoritative positions in the church, the Vatican revision commission's Archbishop Castillo Lara said last week.

Women still will not be allowed to be formally installed in lay ministries as permanent lectors (readers of scripture during a mass) or acolytes (who prepare vestments, wine and communion hosts for mass). Both roles are considered steps toward the priesthood. Dashing some expectations, the code also does not relax the traditional ban on girls serving a priest during mass as altar boys do.

In an apparent attempt to avoid any appearance of impropriety, the code retains a restriction on women going to confession outside a regular place of confession, although men are permitted to do this. But in the old code, the husband had priority in determining the legal residence of the wife; in the new code, husband and wife are treated equally.

Women also will be eligible for some posts that the old code restricted to men-- administrative and teaching positions at seminaries, for example. They also will now be able to become diocesan chancellors, financial administrators of a diocese or church, and board members of a seminary. The new code opens these to "all lay persons," according to the Archbishop Castillo Lara.

It also permits lay men and women to serve on parish councils, a new development since Vatican Council II. But it does not require the formation of these councils, one way in which lay persons can exercise some power in the church.

Leaving the formation of parish councils as an option at the discretion of the local bishop is "a weakness" in the code, said Catholic University's Father McManus.

The code authorizes preaching by lay persons with the approval of local bishops--but not in a homily, or formal sermon during mass, which is still reserved for priests and deacons. It also, in certain circumstances that will probably apply to mission areas, authorizes a bishop with permission from the Vatican to appoint lay persons to administer baptism or serve as official church witnesses for marriages on a regular basis when no priest is available.

In a new attempt to outline rights, the code specifies the fundamental equality of all who are baptized in the church and the right of all to participate in the life of the church. It spells out the rights of lay employes of the church to adequate wages, old age security and health benefits.

It also recommends that regional courts and a national appeals court be set up to handle complaints by parishes or individuals, even against their bishops.

But it leaves to bishops' conferences or local bishops the decision whether to set up such courts.

One provision, widely criticized as a step backward, is a requirement that theologians in colleges be approved by their bishops.

The provision prompted fears beyond a threat to theological freedom--millions of dollars each year in government funds to Catholic colleges in the United States could be jeopardized because of the country's constitutional separation of church and state, Catholic college administrators said.

For the Australian and U.S. churches, which had obtained special permission from the Vatican 11 years ago to streamline procedures for annulments of marriages--church certification that the first marriage was invalid in the eyes of the church--the new code will add another step, slowing down the process. That is a review of all annulment decrees from the current local diocesan annulment courts by a second, three-member court. The annulments are necessary for Catholics who want to marry again in the church.

The new courts are expected to be set up on a regional basis by the National Conference of Catholic Bishops. U.S. Catholic officials believe the new step will delay annulments by two to three months. The Vatican has been concerned about the rapid rise in American annulments, which reached about 40,000 last year, from only about 1,000 a year before the streamlined procedures were put into place.

But the code includes new grounds for anulments, among them "emotional immaturity." This had previously been granted by the Vatican to the U.S. and Australian churches and made annulments easier to obtain. "The big thing--the reasons granted for annulments--has been retained," says the Rev. James Young, national chaplain for the North American Conference of Separated and Divorced Catholics, an organization with 1,000 chapters across the country.

Worldwide, recommendations have been made to go even further. The last synod of bishops--a worldwide gathering of bishops which meets every three years at the Vatican--had recommended in 1980 that the Vatican study the practice of Eastern Orthodox Christians permitting a church-sanctioned second marriage after divorce. The recommendation was made partly in recognition that the annulment procedures are used primarily only in industrialized nations.