Caste itself isn't explicitly protected (axes of discrimination that weren't widely recognized as actual things people cared about in the US when the law was written don't tend to be) but there are arguments that caste discrimination runs afoul of existing US protection regarding color, ethnicity, national origin, and religion, among others, and some of these are currently being actively litigated in federal court, IIRC by both private plaintiffs and state fair-employment authorities.
So “might be fine”, but very much might not. And HR is usually about avoiding risk of exposure, not steering the company into “might be fine” waters.
Perhaps not explicitly, but I could easily see courts ruling that it is. To me, it seems covered by the ethnicity portion, although I get they are not the exact same concept.
Although, the OP's case, the person did quickly realize her mistake, but bias might still be present.