There is not a lot to go on in the question and some ambiguity. For example, does, "The container can have any kind of cap (including white IR reflecting material)," mean that the container(s) with which you will be confronted may have different kinds of caps over which you have no control, or do you mean you can specify the type of cap used? Also, I am presuming that what is not water in the vessel is air. Do you have to use IR? Why? What wavelength? Are the container and water both transparent to that wavelength?
Reflected light from the cap can be used to estimate water level, because the refractive index of water is so much greater than air. Thus, the light is slowed in passing through the water. As a reference, I have measured the water level in a bucket using reflected light (not IR) and a time of flight device. However, I am skeptical you can meet the specifications you give without some quite expensive equipment and/or other operating restrictions.
John