We demonstrate the use of collective Thomson scattering (CTS) for spatially localized measurements of the isotopic composition of magnetically confined fusion plasmas. The experiments were conducted in the TEXTOR tokamak by scattering millimeter-wave probe radiation off plasma fluctuations with wave vector components nearly perpendicular to the magnetic field. Under such conditions the sensitivity of the CTS spectrum to plasma composition is enhanced by the spectral signatures of the ion cyclotron motion and of weakly damped ion Bernstein waves. Recent experiments on TEXTOR demonstrated the ability to resolve these signatures in the CTS spectrum as well as their sensitivity to the ion species mix in the plasma. This paper shows that the plasma composition can be inferred from the measurements through forward modeling of the CTS spectrum. We demonstrate that spectra measured in plasmas consisting of hydrogen, deuterium and 3He can be accurately reproduced by theory and yield inferred plasma compositions consistent with expectations. The potential to use CTS for measurements of plasma composition is of significant interest since CTS is well suited for reactor environments and since there is at present no established method to measure the fuel ion density ratio in the core of a burning fusion plasma.