In this work, we investigate the chemical composition of a reactively sputtered photochromic YHxOy thin film by non-destructive ion beam-based techniques, i.e., Rutherford Backscattering Spectrometry, Particle-Induced X-Ray Emission, Time-of-Flight/Energy coincidence Elastic Recoil Detection Analysis and Elastic Backscattering Spectrometry. To enhance the accuracy of the analysis, the set of spectra was evaluated in an iterative self consistent approach. This procedure resulted in high-resolution depth profiles of the chemical composition and revealed a thin oxygen-rich-layer on the surface, which apparently does not act as a self-passivation layer. In the film, the concentration of Y remains practically constant, whereas O replaces H during the oxidation process. In situ light illumination was performed during the compositional analysis in a high vacuum setup. The results from these measurements demonstrate that, for these samples, the induced reversible photochromism is not linked to any detectable change in the bulk composition of the film and can thus take place even in a vacuum environment.