Set the packed bag on a table with the bottle removed. Stand the ruler on the floor at the center of the proposed bottle position. Bring the zipper panels together by hand. Read to the underside of the lowest zipper tape or padded flap you can bring into its closed position.
Repeat where the cap’s front and back edges would sit. The shortest reading across that footprint controls fit. A bottle that can stand in a rear corner still needs enough width and depth to share that corner with the lunch box.
Illustrative example
Clear heights from back to front are 29, 26.1 and 24.8 cm. The bottle stands 25.4 cm tall with its cap on. The front position is 0.6 cm short. At the back the center reading leaves 3.6 cm, so move the bottle there and check both edges of the cap’s footprint again.
Try this exampleIf the zipper stops while crossing the cap, open it and move the bottle. Pulling harder will not tell you whether the same position works under your normal load.