Nonprofits face the possibility of having to amend their returns after a federal judge struck down the Trump administration’s rollback of donor disclosure requirements.

The IRS—if it doesn’t appeal a July 30 ruling invalidating July 2018 guidance—will need to make a decision whether to accept returns that have already been submitted or require taxpayers to go back and change them, said Marcus Owens, a partner at Loeb & Loeb LLP in Washington and former head of the IRS Exempt Organizations division.

The federal judge who made the decision vacated the policy (Revenue Procedure 2018-38) because...