I don't know if they legally can but I don't see how that would be brought up in the conversation. For the most part, they just call past employers to confirm that you worked there and are not making things up. Most places don't even ask if you are eligible for rehire, which used to be really common. Perhaps if you listed someone at that company as a reference, and they were evil and wanted to rat you out, they might tell a future employer.
But could this legally happen? Hopefully someone weighs in for you.