Leaders of almost every nation in the Western Hemisphere are expected to attend the signing here Sept. 7 of the Panama Canal treaties, raising what had once been seen as a purely ceremonial event to a meeting of major political significance.

The visiting heads of state - who include a wide range of leaders from leftist as well as military-ruled countries - will use the ocassion for individual talks with President Carter, who has set improved relations with Latin America as cheif goal of his administration.

As of yesterday, 11 heads of state had accepted invitations, including two ruling generals who will be meeting Carter for the first time, Presidents Augusto Pinochet of Chile and Jorge Videla of Argentina.

The presidents of two major democracies, among the few remaining in Latin America, also have accepted: Alfonso Lopqez Michelsen of Colombia and Carlos Andres Perez of Venezuela.

Secretary General Alejandro Orfila of the organization of American States extended the invitations "at the request" of President Carter and Panamanian head of state, Gen. Omar Torrijos.

A major purpose for the gathering of the Latin presidents is to show solidarity with Torrijos on the canal issue. A leading U.S. opponent of the treaties, Ronald Regan, said last week that several principal Latin American nations privately favor continued U.S. control of the waterway.

Usually cited as taking such a position is Brazil. However, Brazilian President Ernesto Geisel, cabling his response yesterday to the OAS invitation, called the signing "extremely positive." He declared a desire to attend but said he was required to be at home on Sept. 7, which is Brazil's national day. Vice President Adslberto Pereira dos Santos is to attend in his stead.

OAS Secretary General Orfila referring to what is expected to be a battle over ratification in the U.S. Senate, said that "what Latin Americans are primarily hoping is that the [deliberations] will not prove so divisive and so negative that the peaceful course of regional harmony will be permanently derailes."

Orfila, the former Argentinian ambassador to the United States, indirectly disputed the argument offered by Reagan and other Republcian opponent issues galvanize and unity Latin Americans into a common posture against the United States as much as the question of the future of the Panama Canal."

Orfila also pointed out that the negotiations leading to the U.S.-Panamanian accord were launched under OAS auspices in 1964. The stop-and-go negotiations have been a topic at most of the annual OAS foreign ministers' meetings since then, with the nations repeatedly calling for a "just solution" in keeping with QAS principles - which are aimed at preventing U.S. intervention in affairs of other member states.

The ceremony will take place at the Hall of the Americas in the Pan American Union, which, as headquarters of the 26-nation OAS, has extra territorial status. The OAS will be the depository of the treaty that is to gurantee the neutrality of the canal after it reverts to Panamanian contro in the year 2000. That treaty will be open to all nations of the world.

The second treaty, detailing the gradual U.S. withdrawal from operations in the Canal Zone, will be signed only by Carter and Torrijos. The treaties must be ratified by a plebiscite in Panama, which is expected to be overwhelmingly in favor, and by a two-thirds majority of the Senate, with the outcome of that vote uncertain.

The United States and Panama turned to the OAS fot the ceremonial signing after initial indecision on in whether to hold it in Panama City or in Washington. If the treaties are ratified by the Senate, Carter is expected to go then to Panama.

One member of the OAS, Cuba, was not invited. President Fidel Castro has been a firm supporter of Torrijos in his quest to regain the canal. however, Cuba was excluded from active participation in the OAS in 1964.

Heads of government of two non-members of the OAS, Canada and Guyana, were invited as active permanent observers of the organizations.

Canadian Prime Minister Pierre Elliott Treadeau is expected to respond early this week, according to reports from ottawa.

Other heads of government who have already accepted invitations include those of Bollvia, Costa Rica, Honduras, E1 Salvador, Ecuador, and the Dominican Republic.

If most of the leaders request an opportunity to meet with President Carter, the sessions may have to begin Sept. 6 and continue through Sept. 8 according to officials working out the schedule.