TITLE: Ideal norm in orders
QUESTION [9 upvotes]: Let $\overline{T}$ be a Dedekind ring such that $\overline{T}/\overline{I}$ is finite for every nonzero ideal $\overline{I}$ of $\overline{T}$. Let $T$ be a subring of $\overline{T}$ with the same total ring of fractions (i.e. an order).
Let $I$ be an ideal of $T$ and let $\overline{I} = I\overline{T}$. The norm $N_T(I)$ of $I$ is defined to be the cardinality of $T/I$.
Question: Is there a formula relating $N_T(I)$ and $N_{\overline{T}}(\overline{I})$?
For example, it seems plausible that the discrepancy is measured by some "tor" group.
Remarks:

If $I$ is projective then $N_T(I)$ and
$N_{\overline{T}}(\overline{I})$ are equal.
Localization reduces the problem to the case when
$T$ is local (and $\overline{T}$ is semi-local), and both $I$ and the conductor of $T$ are proper ideals.
(Thanks to Luc Guyot) If $T$ is a Bass ring ($\leftrightarrow$ every intermediate ring $T \subset R \subset \overline{T}$ is Gorenstein $\leftrightarrow$ every ideal is generated by two elements), and $T = \{a \in \overline{T} : a I \subset I \}$, then by [2, Proposition 5.8] $I$ is projective. It follows that $N_T(I)$ and $N_{\overline{T}}(\overline{I})$ are equal (by the first remark).
(generalization of third remark) if $T$ is a Gorenstein integral domain and $T = \{a \in \overline{T} : a I \subset I \}$, then $I$ is projective. This follows from combining Theorem 6.2(4) with Proposition 7.2 of [1]. It follows that $N_T(I)$ and $N_{\overline{T}}(\overline{I})$ are equal (by the first remark).

[1] H. Bass, "On the ubiquity of Gorenstein rings", 1963.
[2] L. Levy and R. Wiegand, "Dedekind-like behavior of rings with 2-generated ideals", 1985.

REPLY [2 votes]: I am recording for the benefit of others what is to my knowledge the full extent of what is known about the general problem. Luc Guyot has provided a nice and explicit answer for the case of quadratic orders.
I do not mark this post as "the answer" as the original question has not yet been answered.
Let the discrepancy of a $T$-ideal $I$ be defined as $ds(I) = N_{\overline{T}}(\overline{I})/N_T(I)$ (non-standard definition).
When does $ds(I) = 1$?
The following theorem is the main tool of the paper [1]. The statement uses the module index notation of [2].
Theorem [1; Theorem 1]:

$[\overline{T}:\overline{I}] \subset [T:I]$.
$[\overline{T}:\overline{I^{-1}}] \subset [I:T]$.
$[{T}:{I^{-1}}] \subset [\overline{I}:\overline{T}]$.

Moreover, the following are equivalent:

Any subset relation among (1), (2), (3) is an equality.
All subset relations among (1), (2), (3) is an equality.
$I$ is invertible.

This theorem has the following corollaries for the "discrepancy". Recall that the different of $T$ is defined to be $\mathfrak D_{T} = (T^\vee)^{-1}$ where $T^\vee$ is the dual of $T$ for the trace form.
Corollary: $ds(I) \geq 1$ with equality if and only if $I$ is invertible.
Corollary: The following are equivalent:

The discrepancy of $\mathfrak D_{T}$ is $1$.
For every ideal $I$ of $T$, $ds(I) = 1$ if and only if $T = (I:I)$.
$T$ is Gorenstein.

Everything in these corollaries follows immediately from the theorem except the second point of the second corollary which follows from the well-known equivalence $T=(I:I) \iff I \text{ invertible}$ when $T$ is Gorenstein (cf. e.g. [3; Proposition 5.8] or [4; Proposition 2.7]).
Quadratic case
[Following the notation in Luc Guyot's answer]
Using the above corollaries we revisit the quadratic case. The discrepancy is invariant under homotheties and so we may assume the ideal $I$ is primitive ($e = 1$). By [5; Lemma 6.5], the ideal $I$ satisfies $R = (I:I)$ if and only if $\gcd(a,b,c) = 1$. Indeed, the formula for the discrepancy in Luc Guyot's answer is precisely $\gcd(a,b,c)$. (By the remark in Luc Guyot's answer, we even have $ds(I) = f/f'$ where $f$ is the conductor of $T$ and $f'$ is the conductor of $(I:I)$.) Thus the formula $ds(I) = c(q_I)$ is consistent with the second corollary.
Upper bound
We will derive an upper bound for $ds(I)$ which is independent of $I$. I assume that $T$ is a domain for simplicity. We may suppose that $T \neq \overline{T}$ and set $S = \overline{T}$. Let $\mathfrak f$ denote the conductor of $T$.
Upper bound: For any T-fractional ideal $I$, $ds(I) \leq |S/T||S/\mathfrak f|.$
Two $T$-fractional ideals are in the same genus if they are locally isomorphic; equivalently, there exists an invertible T-ideal which multiplies one ideal into the other.
Claim: Any $T$-fractional ideal $I$ is in the same genus as a $T$-fractional ideal $J$ such that $\mathfrak f \subset J \subset S.$
Proof: Let $P$ be a prime ideal of $T$ and let $S_P$ denote the integral closure of $T$ (integral closure commutes with localization). It suffices to construct a $T_P$-fractional ideal which is isomorphic to $I_P$ such that $\mathfrak f_P \subset J_P \subset T_P$ where subscript denotes tensoring with $T_P$. $S_P$ is a finite product of local Dedekind rings so it is a PID. Hence $I_PS_P = \alpha S_P$ for some $\alpha$ in $Quot(T)$. Let $J_P = \alpha^{-1}I_P$. Then $J_P \subset S_P$, but also $$J_P \supset J_P \mathfrak f_P = J_P S_P \mathfrak f_P = \mathfrak f_P.$$
Claim: The discrepancy $ds(I)$ is constant on genera.
Proof: This is proven by localizing and using that an invertible ideal of $T$ is locally principal (this latter fact follows from [5; Proposition 2.3]).
Putting these claims together, we have that for $I$ any $T$-fractional ideal, $ds(I) = ds(J)$ for some $T$-fractional ideal $J$ such that $\mathfrak f \subset J \subset S$. From [1; Theorem 1], $|T/J| \leq |S/SJ|$. We also have $S\mathfrak f = \mathfrak f \subset SJ \subset S$, and so $|S/SJ| \leq |S/\mathfrak f|$. Write $M' = M/\mathfrak f$ for any module containing $\mathfrak f$. Putting the inequalities together we have
$$ds(I) = |S/SJ|/|T/J| \leq |S/\mathfrak f|/ |T/J| = |S'|/(|T'|/|J'|) = |S/T| |J/\mathfrak f| .$$
The last term is bounded from above by $|S/T| |S/\mathfrak f|$.
Conclusion
The discrepancy function satisfies the inequality, $1 \leq ds(I) \leq |\overline{T}/T||\overline{T}/\mathfrak f|$, for any $T$-fractional ideal $I$, and admits an explicit and natural formula in terms of conductors in the quadratic case.
However it appears to be unknown whether the discrepancy function can be given a "closed form" in general (e.g., an expression in terms of the conductor of $T$, the differents or discriminants of $T$ and $\overline{T}$, Ext or Tor groups over $T$ or $\overline{T}$).
References:
[1] I. Del Corso, R. Dvornicich, Relations among Discriminant, Different, and Conductor of an Order, 2000.
[2] A. Fröhlich, Local fields, from J. W. S. Cassels and A. Fröhlich, Algebraic number theory, 1967.
[3] L. Levy and R. Wiegand, Dedekind-like behavior of rings with 2-generated ideals, 1985.
[4] J. Buchmann and H. W. Lenstra, Jr., Approximating rings of integers in number fields, 1994.
[5] V. M. Galkin, $\zeta$-functions of some one-dimensional rings, 1973.