Is an ATM legally obliged to display withdraw fees in the United States?
Yes (for the fees it is charging you)
Per the Electronic Funds Transfer Act, section 904(d)(3)(C):
No fee may be imposed by any automated teller machine operator... unless (i) the consumer receives such notice in accordance with subparagraph (B); and (ii) the consumer elects to continue in the manner necessary to effect the transaction after receiving such notice.
Subparagraph (B) states that the notice must
appear on the screen of the automated teller machine, or on a paper notice issued from such machine, after the transaction is initiated and before the consumer is irrevocably committed to completing the transaction.
It used to be the case that a sticker near the ATM was required in addition to it being displayed on-screen or on paper, however that requirement was removed by Congress in 2012.
It does not seem to be required to tell you about what your own bank will charge you... but then, you should probably not rely on a third party to tell you what your bank charges you.