Aims. Estimating molecular abundances ratios from the direct measurement of the emission of the molecules towards a variety of interstellar environments is indeed very useful to advance in our understanding of the chemical evolution of the Galaxy, and hence of the physical processes related to the chemistry. It is necessary to increase the sample of molecular clouds, located at different distances, in which the behaviour of molecular abundance ratios, such as the 13 CO/C 18 O ratio, is studied in detail. Methods. We selected the well-studied high-mass star-forming region G29.96−0.02, located at a distance of about 6.2 kpc, which is an ideal laboratory to perform this kind of studies. To study the 13 CO/C 18 O abundance ratio (X 13/18 ) towards this region it was used 12 CO J=3-2 data obtained from the CO High-Resolution Survey, 13 CO and C 18 O J=3-2 data from the 13 CO/C 18 O (J=3-2) Heterodyne Inner Milky Way Plane Survey, and 13 CO and C 18 O J=2-1 data retrieved from the CDS database which were observed with the IRAM 30 m telescope. The distribution of column densities and X 13/18 throughout the extension of the analyzed molecular cloud was studied based on LTE and non-LTE methods.Results. Values of X 13/18 between 1.5 to 10.5, with an average of about 5, were found across the studied region, showing that, besides the dependency between X 13/18 and the galactocentric distance, the local physical conditions may strongly affect this abundance ratio. We found that correlating the X 13/18 map with the location of the ionized gas and dark clouds allows us to suggest in which regions the far-UV radiation stalls in dense gaseous components, and in which ones it escapes and selectively photodissociates the C 18 O isotope.The non-LTE analysis shows that the molecular gas has very different physical conditions, not only spatially across the cloud, but also along the line of sight. This kind of studies may represent a tool to indirectly estimate (from molecular lines observations) the degree of photodissociation in molecular clouds, which is indeed useful to study the chemistry in the interstellar medium.