The more that I think about it, the more I believe that you will may want to take the ultrasonic sensor approach. My reasoning is that IR sensors work on detecting the amount of reflected light from the transmitter and that can vary widely based on the characteristics of the reflected surface. I suppose that a measurement could be made from a reference material (sheet of white paper, etc.) at 24" and 26" and then apply a conversion factor based on the reading of the actual material at the 24" starting location. It could be done and if you have a Sharp sensor, you could experiment with that idea. BTW, here is a link to information about Sharp IR Rangers
Ultrasonic sensors work on the basis of time-of-flight. They are able to calculate exact distances based on the time it takes for a transmitted signal to leave the sensor, bounce off the target, and be detected by the sensor. The type of reflective material doesn't change the time involved, only the amplitude of the reflected signal. At 24" you shouldn't have any problems with any kind of material. Therefore, you will probably be up and running quicker using an ultrasonic solution. Have a look at the Maxbotics ultrasonic ranger
products. You'll be spending about $8 - $9 more than the Sharp IR solution, but I think you will have fewer issues.
There are many sample programs for the Arduino for both types of sensors. Topeka, I mean Google, is your friend: Google Arduino Maxbotics and Google Arduino Sharp IR