In its last public hearing before marking up legislation, a Senate subcommittee heard pro-and-con testimony yesterday on a reciprocity bill designed to assure American exporters equal treatment to that afforded by this country.

The bill, introduced by subcommittee Chairman Sen. John Danforth (R-Mo.), would permit the president to retaliate against the products or investments of any major power if that country is deemed by the United States to have denied "commercial opportunities substantially equivalent to those offered by the United States."

Several witnesses who reject this approach, fearing it may violate U.S. multilateral trade agreements, agreed, nonetheless, that trade with Japan "poses a number of vexing problems," as one of them put it. They said the problem calls for a broader approach dealing with the underlying reasons for declining American competitiveness.

Sen. Paul E. Tsongas (D-Mass.), appearing as a witness at his own request, testified that reciprocity was a form of protectionism that "is not the answer to our trade problems . . . . Protectionism is an opiate that delays our coming to grips with the real enemy, which is our own inability to compete with other industrial economies."

The Reagan administration's position, as outlined before the same committee on March 24 by U.S. Trade Representative William Brock, is that "market access" is a reasonable goal, but that it disapproves of any language that would require this country to retaliate automatically against discrimination by other countries.

Finance Committee Chairman Robert Dole (R-Kan.) drew attention to testimony yesterday by Lawrence F. Snowden, president of the American Chamber of Commerce in Japan, who said that, in his judgment, the Japanese political leadership is ready to move to resolve the problems, and that no further legislation is necessary.

"The historical pattern has been that relaxation of restrictions by Japan has been achieved only under heavy outside pressure," Snowden conceded. He added that Japan had taken some "very positive steps" recently in response to criticism from its trading partners.

Danforth responded that the purpose of his legislation was "not to threaten" or prod the Japanese to action "but rather to get it enacted into law with a mechanism that will achieve equitable treatment for U.S. exports."

Some witnesses cited Latin American countries as well as Japan for various offensive trade practices that require a legislative remedy.

Danforth said that prospects for passage of legislation this year along the lines of his bill are good.

Among the strongest supporting statements yesterday was one by W.J. Sanders III, president and chairman of Advanced Micro Devices Inc., a leading manufacturer of semiconductors.

Testifying on behalf of the industry trade association, Sanders said that it is urgent that the Danforth bill be enacted this year. He also urged passage of the High Technology Trade Act introduced by Sens. Gary Hart (D-Colo.), Alan Cranston (D-Calif.) and John Heinz (R-Pa.), which proposes negotiated agreements to eliminate international barriers to high-technology trade and investment.

On the other side of the argument, David J. Steinberg of the U.S. Council for an Open World Economy said that the reciprocity legislation would be "ineffective in addressing the problems the United States faces in securing equitable access to Japan and other world markets" and would be counterproductive.

The League of Women Voters took much the same position, arguing that reciprocity legislation "turns its back on the most-favored-nation concept of nondiscrimination, the cornerstone of 30 years of multilateral institution building."

The AFL-CIO, speaking through its legislative representative, Stephen Koplan, said the Danforth bill "diverts attention from the real problem"--an excessive flow of imports into the United States.

On the other hand, Howard D. Samuel, president of the AFL-CIO Industrial Union department, joined with Claude E. Hobbs, a Westinghouse Electric Corp. vice president, in speaking for the legislation on behalf of the Labor-Industry Coalition for International Trade.