We have previously explained that Hamets is a food that comes from one of the following five grains: wheat, barley, spelt, barley and oats. Rice, therefore, is not Hamets. This subject was originally discussed in the Gemara. A Sage from Erets Israel, Rabbi Yohanan ben Nuri (1st century of the common age) argued that rice cannot be consumed in Pesah. The Sages of the Gemara, however, concluded that rice is NOT Hamets and that it can be eaten in Pesah. The Gemara also records the case of Rabbah, a famous Rabbi of Babel, who used to eat rice in the Pesah Seder. (Pesahim 114b).
The Ashkenazi custom, however, is to refrain from consuming rice, but not because it considers it Hamets. During Pesah, Ashkenazi Jews refrain from consuming all type of legumes and grains (qitniyot). This is a very old tradition which is still observed in many communities to this day.
In the case of rice, for example, it is very possible to confuse rice with wheat. The ears and grains of brown rice and wheat look very similar. The same is true for rice flour and wheat flour. It should be also noted that until about 80-100 years ago food products were not sold as they are today, packaged, in the shelves of supermarkets or grocery stores. Food was sold in street markets by weight. It was not uncommon then to find grains of wheat mixed with grains of rice. Rice grains and wheat grains were sold in the same booths, and merchants used the same pallets and scales for both. Additionally, the fields where rice was harvested used to be near or within the same fields where wheat or barley was harvested. It was very common then that some grains of wheat would be mixed with rice. And, as we shall see later, the prohibition of Hamets during Pesah is so strict that a single grain of wheat would turn a whole plate of rice into Hamets. Hence the Ashkenazi custom of abstaining from rice in Pesah.
It is worth noticing that abstaining from rice in Pesah is not an exclusive tradition of Ashkenazi Jews. Sephardic Jews are divided on the question of rice. Moroccan Jews and Jews from other North African communities (except Egypt) also avoid rice consumption during Pesah. While Jews from Israel, Iran, Iraq, Syria and other Middle Eastern countries consume rice during Pesah (to the point that rice becomes the most common Pesah food, like potatoes for Ashkenazi Jews). However, to avoid the possibility of the accidental presence of a grain of wheat in rice, the custom of Middle Eastern Jewish communities is to check the rice three times before using it for Pesah.
Now, even those who follow the tradition of refraining from consumption of rice and other legumes (qitniyot) during Pesah, can keep rice and legumes in their possession and property during Pesah, and there is no need to discarding or selling these foods before Pesah (Shulhan Arukh, Rama, 453:1). Rabbi Eliezer Melamed also points out in his Penine Halakha that although the Ashkenazi custom is to avoid the consumption of qitniyot products during Pesah, this rule applies when the qitniyot are or constitute the majority of that food product (Mishna Berura idem, 9). But if the qitniyot food is present in a small proportion, and/or if the qitniyot are used as a food additive (like: corn fructose, corn starch, etc.) that food is not be forbidden for consumption during Pesah, even for those who refrain from qitniyot during Pesah.
Check with your Rabbi about the specific traditions of your community.