I've not tried using a Bitcoin ATM (though there are a few here in town. If you buy with cash there shouldn't be any records to keep other than transaction and wallet info. Of course if an address is known to be your address, then I guess the anonymity is gone.
Better to just use Monero ;-)