Solution (source code)

= Solution

For a <basis of a module> $m_1,\ldots,m_d$ of the full-rank module $M$, define its <discriminant of elements of a number field> by
$$
\operatorname{disc}(M)=\det(\operatorname{Tr}_{K/\mathbb Q}(m_im_j))_{i,j}.
$$
The <field discriminant> is this determinant for an integral basis of $\mathcal O_K$. A change of integral basis with determinant $\pm1$ does not change it. Write $m_j=\sum_i b_{ij}e_i$ in an integral basis and let $B=(b_{ij})$. The two trace matrices satisfy $T_M=B^{\mathsf T}T_{\mathcal O_K}B$. The index of the lattice is $r=|\det B|$, as follows for example from <Smith normal form>. Therefore
$$
\boxed{\operatorname{disc}(M)=r^2\operatorname{disc}(\mathcal O_K).}
$$
Multiplicative closure makes $M$ an order when it contains one, but the determinant argument itself requires only full finite index, so it also covers the stated module hypothesis without that extra condition.