Some scholars think it's making judgement based on race. Others scholars think only those in power opinions matters and those without power can make judgements based on race and that wouldn't be considered racism. Others think it's a natural and norm thing based on tribalism.
But in your example a person of color would have a higher status in America compared to an Indian national. So the person of color is being racist.
In the future the only acceptable version will be the first because keeping track of who had power in what context is going to be impossible to track and can get easily shifted. That's the definition the law uses currently.
This is one of those cases where a word can have multiple meanings. And anyway, prejudice based on national origin is, in fact, frowned upon no matter what you call it.
That definition sounds very convenient for someone who wants to be racist to a group they've decided has institutional power. I can see why such a person would want to twist the plain meaning of an understood term in such a nakedly manipulative way.