The definition of racism is very fuzzy, partly because the definition of race itself is fuzzy, partly because the definition of discrimination is fuzzy, and partly because racism and other kinds of bigotry tend to go hand in hand.
While most conceptualizations of racism include the notion of “race based discrimination,” the exact definition is controversial both because there is little scholarly agreement about the meaning of the concept “race,” and because there is also little agreement about what does and does not constitute discrimination.
Wikipedia goes into some detail on this confusion. This part is particularly relevant to the question at hand (emphasis added):
Among the questions about how to define racism are the question of whether to include forms of discrimination that are unintentional, such as making assumptions about preferences or abilities of others based on racial stereotypes, whether to include symbolic or institutionalized forms of discrimination such as the circulation of ethnic stereotypes through the media, and whether to include the socio-political dynamics of social stratification that sometimes have a racial component. Some definitions of racism also include discriminatory behaviors and beliefs based on cultural, national, ethnic, caste, or religious stereotypes.
So not everyone agrees, but if you wanted to call the scenario in your question racism, you surely wouldn’t be alone.