When you say 501(c)(3) organization, I assume you mean a public charity and not a private foundation. With a private foundation, there is no such thing as an anonymous donor because all donors have to be disclosed on the annual Form 990-PF tax return, which is a public document.
With a public charity, a large donor has to be disclosed to the IRS on Schedule B to the annual Form 990 tax information return. But that is not a completely public document so that the name on the form might be known only by the preparer and the officer who signs the return. Directors, of course, have a legal right to inspect the books and records of the corporation so they have a legal right to know the identity. They may decide to rely on the president, the board chair, or an executive committee to determine whether to accept such a gift without personally knowing its source, but they have a right to know. (If there are voting members of the corporation, they may also have a legal right to inspect the books to find out.)
You have to assume that the anonymity, no matter how few know the identity, won’t be totally maintained. Because of the potential for adverse public reaction if it becomes known that an organization is being funded by a creep, as a director or trustee, I would want to know the donor’s identity if it is a significant gift. Even if I don’t object to the gift, I would want to be prepared if people start asking questions.
If the donor really wants to keep it anonymous, he or she should give it — or “launder” it if I want to be pejorative — through an attorney or other intermediary, such as an anonymous donor advised fund at another charity. In that case, the organization has to decide whether it will accept what many would consider a “tainted” gift. Keeping a gift anonymous as to the general public is one thing. Keeping it anonymous as to those responsible for the organization is another thing entirely.