Walter Dellinger, who served as acting United States solicitor general in the Clinton administration, said Judge Marrero’s opinion was “an emphatic rejection of the imperial presidency claim that a president cannot even be investigated.”

The judge’s decision came a little more than a month after Mr. Vance subpoenaed Mr. Trump’s accounting firm, Mazars USA, for his personal and corporate tax returns dating to 2011.

Mr. Vance’s office has been investigating whether any New York State laws were broken when Mr. Trump and his company, the Trump Organization, reimbursed the president’s former lawyer and fixer, Michael D. Cohen, for payments he made to the pornographic film actress Stormy Daniels, who had said she had an affair with Mr. Trump. Mr. Trump has denied the affair.

Mr. Trump’s lawyers sued last month to block the subpoena. The lawyers acknowledged that their constitutional argument had not been tested, but said presidents have such enormous responsibility and a unique position in government that they cannot be burdened with investigations, especially by local prosecutors who might be politically motivated.

“This case presents momentous questions of first impression regarding the presidency, federalism and the separation of powers,” a lawyer for the president, Patrick Strawbridge, wrote to the appeals court on Monday. He said the losing party should be given time to appeal to the Supreme Court.

The case also has drawn in Mr. Trump’s own Justice Department, which has not taken a position on the president’s argument but supported his request to delay enforcement of the subpoena because of the “significant constitutional issues.”