“We're asked to set aside that fundamental concept of fairness and equity, not because we're faced with any actual situation, but a hypothetical situation,” said Assemblyman Andy Goodell, a Republican from Jamestown, N.Y.

That argument was echoed by the outgoing state Republican Party chairman, Edward F. Cox, who said that the State Legislature was suffering from “Trump derangement syndrome.”

“They should be focusing on people in New York State, and what they need,” Mr. Cox said.

Republican ire was likely to be raised on Wednesday, too, as both the Assembly and the Senate planned to pass the bill creating a pathway for Congress to seek Mr. Trump’s state tax returns, which are likely to contain much of the same financial information as the president’s contested federal returns. New York is the president’s home state and the headquarters of his business.

Efforts to obtain Mr. Trump’s federal tax returns have been repeatedly thwarted by the president’s refusals to release them, citing pending audits. That intransigence hit new heights in recent months, as the White House has defied congressional subpoenas and has said that Democrats will “never” see his returns.

The White House had no immediate comment on the New York bills.

In remarks on the chamber floor before the vote, Assemblyman Joseph Lentol, a Democrat from Brooklyn, called passage of the double jeopardy bill a victory for states’ rights amid federal defiance.

“It has to do with presidential power, period,” Mr. Lentol said, adding, “This new law will confront any president, not just this one, who thinks that he or she can get away with washing away illegal behavior.”

Neither of the two bills specifically mentions Mr. Trump, though lawmakers have not been shy about their intentions to pursue the president’s financial information. There have also been efforts to avoid legal challenges, including several recent amendments to narrow the state tax bill’s focus to public officials, employees or officials in the federal executive branch, as well as other holders of government posts and political party leaders.