Amid dozens of carbines, rocket launchers and submachine guns displayed on a cloth-covered table and tacked to large sheets of peg board, a House Merchant Marine subcommittee heard charges yesterday that Panama is supplying Nicaraguan guerillas with guns to overthrow the Nicaraguan regime.

The hearing was in fact a sideshow, and the guns were weapons for the Republican right wing in what it considers the real battle - trying to cripple legislation implementing the Panama Canal treaties. That legislation reaches the House floor next week.

House GOP conservatives, backed by the key witness yesterday, Nicaraguan Vice President Luis Pallais, contend the evidence of Panamanian gun smuggling to the Sandinista guerrillas in Nicaragua cast doubts on whether Panama can be trusted to uphold the treaties.

Rep. George Hansen (R-Idaho) said a new amendment to the canal legislation may be offered to delay implementation of the treaties. He said Panama could not be considered "a reliable partner" if it has been taking part in the gun running.

But State Department official Brian Atwood charged that the committee was simply giving the Nicaraguans a forum and added there was "no evidence" of Panamanian government approval of the gun smuggling. "If this were a court of law, I might have to challenge the judges," he said. He added that nothing would bring destabilization to the area more surely that U.S. rejection of the Panama Canal treaties.

However, committee chariman John M. Murphy (D-N.Y.), who is ostensibly helping the administration try to pass the implementing legislation, said there was "no question" of Panamanian involvement and suggested some changes in the legislation might be required.

Pallais testified that two vans containing 90 U.S. M-1 carbines and 34 Belgian-made rifles were seized at the Nicaraguan-Costa Rican border by the Nicaraguan National Guard. Seventy of the M 1s were traced to guns sold by Universal Firearms and Johnson Arms in New Jersey to Casa y Pesca in Panama, which Pallais charged was a "paper" company, in which Col. Manuel Noreiga, head of the Panamanian G-2 intelligence, is a principal stockholder.

Pallais charged Panamanian government officials with "complicity" in trying to overthrow the Somoza regime in Nicaragua and said Panamanian Gen. Omat Torrijos and President Aristides Royo "are unfit to operate a canal of such socio-economic importance to the world."

Authorities in Miami gun dealers Tony Alvarez and James Allen Howell, and Carlos Wittgreen, president of Casay Pesca, along with others, for the gun running. But Rep. David R. Bowen (D-Miss.), leader of a task force attempting to pass the canal legislation, asked the Nicaraguan official why his country had not brought formal charges against Panama at an Organization of American States hearing earlier this week, if it was sure the Panamaniam government was involved.

Pallais said they were awaiting an OAS commission investigation.

The hearing, asked for by Hansen and Rep. Robert E. Bauman (R-Md.), was designed to counter the administration's buildup in the battle over the treaty legislation. When the House adopted a rule making the treaty legislation in order by only two votes two weeks ago, the administration realized the legislation was in very deep trouble.

Since then the administration has pulled out all the stops to prevent Hansen's amendments from being adopted and to pass the bill. President Carter and Cabinet members are making dozens of phone calls to key congressmen.

But in addition, a State Department spokesman said, oil companies, shipping companies and unions who depend on the canal for transferring goods and for jobs have called on to lobby.

So has former ambassador Averell Harriman, members of the Joint Chiefs of Staff and the president of Ford Motor Co. Even AFL-CIO President George Meany, whose relations with the White House have not been particularly warm, has been enlisted to help in this battle.

The intense lobbying effort is an attempt to offset a conservative blitz. Howard Phillip, national director of the Conservative Caucus, said his organization has sent lists of House members to be lobbied to more than 250,000 canal treaty opponents and has placed "more than 15,000 phone calls" to members of Congress.

The administration considers Hansen's plans to require Panama to pay $2 billion of the costs of transferring the canal to be the key gutting effort and a "treaty violation." Hansen claims it is not, citing Article 3 of the treaty permitting the United States to make assessments. But the amendments would have Panama paying for the upkeep of U.S. schools, early retirement pensions, moving of military facilities and everything but the capital costs of the real estate.

Hansen called it "the honesty amendment," and says it would keep the administration honest about its earlier claims that there would be little cost in the treaties to the U.S. taxpayer.

The administration is arguing that if the implementation legislation is not passed, the agreement will go into effect anyway, but the United States will have no control over the canal and will have to withdraw some 14,000 U.S. military personnel and civilians from the Canal Zone.

The administration also worries that passage of Hansen's main amendments could set off strikes and demonstrations in Panama and jeopardize the U.S. position in Central America. Bauman said the right wing's intention is not to scuttle the implementing legislation, but to make sure that the legislation which comes out of a House-Senate conference is the more restrictive House version and not the version the administration wants.