  Context: CO is an abundant species in comets, creating CO$^+$ ion with
emission lines that can be observed in the optical spectral range. A good
modeling of its fluorescence spectrum is important for a better measurement of
the CO$^+$ abundance. Such a species, if abundant enough, can also be used to
measure the $^{12}$C/$^{13}$C isotopic ratio. Aims: This study uses the
opportunity of a high CO content observed in the comet C/2016 R2 (PanSTARRS),
that created bright CO$^{+}$ emission lines in the optical range, to build and
test a new fluorescence model of this species and to measure for the first time
the $^{12}$C/$^{13}$C isotopic ratio in this chemical species with ground-based
observations. Methods: Thanks to laboratory data and theoretical works
available in the scientific literature we developed a new fluorescence model
both for $^{12}$CO$^+$ and $^{13}$CO$^+$ ions. The $^{13}$CO$^+$ model can be
used for coadding faint emission lines and obtain a sufficient signal-to-noise
ratio to detect this isotopologue. Results: Our fluorescence model provides a
good modeling of the $^{12}$CO$^+$ emission lines, allowing to publish revised
fluorescence efficiencies. Based on similar transition probabilities for
$^{12}$CO$^+$ and $^{13}$CO$^+$ we derive a $^{12}$C/$^{13}$C isotopic ratio of
73$\pm$20 for CO$^+$ in comet C/2016 R2. This value is in agreement with the
solar system ratio of 89$\pm$2 within the error bars, making the possibility
that this comet was an interstellar object unlikely.
