  Let $N$ be a positive integer and $\Gamma$ be a subgroup of
$\mathrm{SL}_2(\mathbb{Z})$ containing $\Gamma_1(N)$. Let $K$ be an imaginary
quadratic field and $\mathcal{O}$ be an order of discriminant $D_\mathcal{O}$
in $K$. Under some assumptions, we show that $\Gamma$ induces a form class
group of discriminant $D_\mathcal{O}$ (or of order $\mathcal{O}$) and level $N$
if and only if there is a certain canonical model of the modular curve for
$\Gamma$ defined over a suitably small number field. In this way we can find an
interesting link between two different subjects, which will be useful in the
study of certain quadratic Diophantine equations in terms of primes $p$.
