The rally will be only the second public appearance by Mr. Trump outside of Washington since he took office. On Friday, he is scheduled to visit a Boeing plant in North Charleston, S.C., for the unveiling of the aerospace manufacturer’s new Dreamliner aircraft.

Mr. Trump filed paperwork with the Federal Election Commission for his 2020 re-election campaign on Jan. 20, the day he was sworn in. That allowed him to continue to accept contributions — including proceeds from the sales of his popular red “Make America Great Again” hats — without running afoul of the law.

Mr. Trump ended the 2016 campaign flush with funds, in part because of substantial sales of the hats. At the end of 2016, he had $7,611,702.92 cash on hand and no debt.

The rally comes at a precarious time for Mr. Trump, as his White House is reeling from personnel turmoil and has yet to score any legislative victories. On Tuesday, he accepted the resignation of his national security adviser, Michael T. Flynn, who had become embroiled in allegations that he had improper contacts with Russian officials before Mr. Trump took office. That was followed on Wednesday by the abrupt withdrawal of Andrew F. Puzder, the president’s nominee to be secretary of labor, amid allegations that he had abused his ex-wife and employed an illegal immigrant.

Mr. Trump had vowed to move quickly to put his policy agenda in place once in the White House. But his effort to use executive power to crack down on immigration has faltered in the face of legal challenges, and his administration has yet to issue a proposal either for repealing the health care law he railed against during the campaign or enacting the tax overhaul he has promised.

Larry M. Noble, the general counsel of the Campaign Legal Center, a nonpartisan group, said he was not aware of any president having held a campaign rally this early in his tenure.