Such scanners exist but most ATMs do not have them. Of course if you fill the ATM with a stack of fresh bills you know the serial numbers for, and you know how many bills were dispensed prior to a particular transaction, you should know which bills got dispensed during that transaction.
Of course the tracking of this information down to that level would be pretty pointless. The moment someone breaks a 20 the connection to the recorded transaction is lost, and there's no one who can prove you didn't break a 20.