The source confirmed the comments reported earlier by the New York Times.
Turning over the names would require UBS to violate Swiss criminal law, and we simply cannot comply, the paper quoted Gruebel as saying in the memo.
A U.S. judge on Wednesday ordered the U.S. government to say whether it was prepared to shut UBS in the United States as part of a battle to learn the identity of the accounts suspected of being used by Americans to avoid taxes.
Switzerland, the world's biggest offshore banking center, vowed in filings to the U.S. court to prevent UBS from handing over client data to the Internal Revenue Service (IRS) to defend bank secrecy laws, saying the tax case is souring diplomatic ties.
UBS said in an emailed statement: The IRS summons puts UBS in an untenable position, caught between the laws of two sovereign nations.
Honoring the IRS summons would require UBS to violate Swiss criminal law.
A UBS spokesman in Hong Kong declined to comment on the memo.
(Reporting by Ajay Kamalakaran in Bangalore; Editing by Dhara Ranasinghe, John Stonestreet)