The acting head of this country's Roman Catholic Church today accused the U.S.-advised Salvadoran Army of killing "many" civilians with "indiscriminate bombing" during last week's major battle against leftist guerrillas.

The charges, in a sermon by Acting Archbishop Arturo Rivera y Damas, lent the considerable political weight of the church to reports from residents of Berlin that El Salvador's U.S.-provided A37 Dragonfly jets bombed or rocketed civilian-populated areas to dislodge guerrillas who occupied the town last weekend.

Berlin, a farming town of 30,000 about 60 miles east of here, was held for five days by the rebel forces. It was the largest town taken over by the guerrillas in El Salvador's three-year-old civil war. By the time the insurgents withdrew Thursday, much of Berlin's commercial center lay burned and crumbled.

A number of residents, backed by Red Cross workers, declared that government planes had bombed rebel positions in the center of the town and on the outskirts. Along with rebel torching of shops, they said, this caused heavy damage and killed civilians. Col. Jaime Flores, who commanded the operation, denied that Army planes had bombed the areas, and reporters who visited Berlin found no bomb craters.

The destruction of buildings, however, led to speculation that the Berlin residents could have been referring to rockets fired from the Army's fighter planes. Asked about the possibility, a western military source with access to the Salvadoran Army described it as "probable."

U.S. diplomats have expressed concern over the issue. Because of U.S. support for the Salvadoran Army, particularly through military advisers stationed here, Washington inevitably is linked to what the Army does.

In addition, this is a delicate moment because of opposition in Congress to the Reagan administration's recent certification that El Salvador is making progress in protecting human rights. Under U.S. law, the administration must make such a certification every six months to continue the military aid crucial to pursuing the battle against leftist forces.

Rivera y Damas, addressing the congregation in San Salvador's downtown cathedral, said a church count showed 27 Salvadoran soldiers were killed in fighting at Berlin and elsewhere in the week ending Thursday. At the same time, he said, rebel fire killed four civilians and another 258 civilians were killed in "unclear" circumstances. "Many of these 258 deaths were caused by indiscriminate bombing that is carried out in the occupied zones," he added.

Speaking to reporters after mass, Rivera y Damas specified that he meant bombing by Army planes and helicopters in the battle for Berlin. The prelate said he personally heard attacks from the air during a visit last Sunday to his home parish at Santiago de Maria, about five miles southeast of Berlin.

Rivera y Damas is San Salvador's acting archbishop and the ranking churchman in this heavily Catholic country. In his sermon, he sought to balance his criticism of government actions by also condemning the "resort to revolutionary violence" undertaken by the rebel movement's political wing, the Democratic Revolutionary Front, and its military wing, the Farabundo Marti National Liberation Front.

"I would like to ask the FDR-FLMN," he said, using the groups' Spanish-language initials, "whether the military and political targets reached by a temporary occupation of a city justify the suffering of thousands of persons."

He called on the government and insurgents alike to avoid reprisals against residents of towns and villages that change hands after occupation by one side or the other in the recently accelerated war. This has occurred in a number of towns in Chalatenango, San Vicente, Usulatan and Morazan provinces in intensified fighting during the last two weeks that has revived a rebel offensive first launched last October.

Despite the effort at even-handedness, the prelate's criticisms seemed to be directed more strongly at the Army and the military's allies among rightist Salvadorans. For example, he denounced what he said was the capture of 25 persons and the murder of 37 more by rightist death squads.

"This is the reality that this country will present to Pope John Paul, even though there are political parties that would try to cover it up . . . or others who would exaggerate it," he said.

The pope is scheduled to visit El Salvador as part of a Central American tour early next month. The visit will carry a particularly political message here. The clergy has played a prominent role in demanding reforms, and the pope last summer urged Salvadorans to seek a peaceful solution to their war through negotiations with the rebels, a position that is strongly opposed by the government and the United States.