The American Bar Association endorsed a controversial extradition treaty with Britain today that Reagan administration representatives said was a crucial weapon in the war against international terrorism but that critics charge will be used to target the Irish Republican Army.

In the first of two days of votes at the ABA's midwinter meeting here, the 441-member House of Delegates also voted overwhelmingly to back legislation providing that foreigners invited to speak or attend conferences in the United States not be denied visas solely on the basis of their political views.

And in a defeat for the administration, the group passed a proposal to require judicial approval before a prosecutor can subpoena an attorney before a grand jury to provide evidence about a client.

The treaty with Britain, which has been awaiting Senate action since July, would eliminate, for crimes such as hijacking, kidnaping, and bombing, the centuries-old "political offense" exception to extradition law under which those accused of committing a crime in another country may battle extradition on the ground that their acts were politically motivated.

"While we all share a concern about terrorism, we must be ever mindful of the rule of law," said Martha W. Barnett, a Florida lawyer representing the Individual Rights and Responsibilities section, which was seeking to have a vote on the treaty postponed until the group's annual meeting in August. The treaty, she said, "asks the ABA to reject 200 years of established legal doctrine."

But State Department legal adviser Abraham D. Sofaer, a former federal judge, urged the lawyers to back the treaty. "This treaty is not written in terms of Irish Catholics," he said. "It's written in terms of conduct. It says if you are living in a democracy you must use the ballot, not the bomb."

"Right now the most important tool in the arsenal of a terrorist is an airplane ticket," added Assistant Attorney General Stephen S. Trott. The extradition treaty, he said, is "simply a statement by civilized people . . . that we will not allow our country to become a sanctuary for terrorists from the United Kingdom."

The proposal to limit the grounds on which foreigners can be denied visas, which would require amending the McCarthy-era McCarran-Walter Act, provides that aliens not be excluded solely on the basis of their past or current political beliefs or associations.

It follows 18 months of negotiations between the State Department and the Individual Rights section, which sponsored the proposal along with the generally conservative Standing Committee on Law and National Security. An earlier version was withdrawn at the association's annual meeting last July.

The compromise position deleted a recommendation that aliens invited to the United States for speeches or other exchanges not be denied a visa "solely on the basis of the anticipated consequences of the intended exchange of ideas."

The recommendation as adopted would also permit the exclusion of foreigners if the government believed their presence would harm U.S. interests.

The issue of ideological exclusion has grown increasingly controversial during the Reagan administration. Among those who have been denied entry are the widow of Chilean President Salvadore Allende and such noted authors as Nobel Prize winners Gabriel Garcia Marquez and Csezlaw Milosz.

Secretary of State George P. Shultz pledged to the PEN writers conference last month that the administration "will never deny physical access to anyone because of the beliefs he or she may espouse."

Legislation amending the existing law on ideological exclusion is pending in the House.

Attorney subpoenas have been of growing concern to the bar as federal prosecutors have moved aggressively to use a new federal law that permits the government to seek forfeiture of attorney fees paid with the fruits of criminal activity.

Under the proposal adopted today, before a lawyer could be summoned to testify a judge would have to find that the information sought is not shielded by the attorney-client privilege, that it is relevant and could not be obtained through other means, and that the purpose of the subpoena is not primarily to harass the lawyer or client.