Donald J. Trump and his allies struggled on Sunday to move beyond the revelation that he might have been able to legally avoid nearly two decades of federal income taxation, putting new pressure on the candidate just as he tries to recover from a lackluster debate performance.

Mr. Trump’s campaign lurched between refusing to acknowledge that the 1995 tax records, portions of which were published on Saturday night by The New York Times, were bona fide, to insisting that his not having paid taxes was evidence of his unrivaled business prowess.

The Times report, based on documents obtained by the newspaper, showed that Mr. Trump, the Republican nominee, declared a $916 million loss on his 1995 income tax returns, which could have allowed him to legally avoid paying any federal income taxes for up to 18 years.

At a rally in Lancaster County, Pa., that began shortly before the article was published, Mr. Trump seemed jarred by the pending revelation, shifting from topic to topic; mocking his Democratic rival, Hillary Clinton, for having had pneumonia; and insinuating that she might have cheated on her husband.