Rice is a dessicant, so it tends to absorb moisture from its surroundings. Putting the calculator and rice in an airtight bag only allows the rice to absorb moisture from the calculator once any moisture in the limited amount of air in the bag is absorbed. If you've ever seen rice inside of a salt shaker in a restaurant, it's there to keep the salt dry.
Whether or not this tactic would actually work in this case, I'm not sure. But I've had an iPod touch be in a washing machine for about 5 minutes which seemed as if it had killed it, so I dried it off the outside and put it in a bag with rice. I took it out about a day later to discover that everything except the wifi worked, which was a better outcome than I had feared.