Let $K$ be an algebraic number field of degree $n$. Let $\mathcal{O}_K$ be the ring of algebraic integers. Let $R$ be an order of $K$, i.e. a subring of $K$ which is a free $\mathbb{Z}$-module of rank $n$. Let $\alpha_1, \cdots, \alpha_n$ be a basis of $R$ as a $\mathbb{Z}$-module. Let $D =$ det$(Tr_{K/\mathbb{Q}}(\alpha_i\alpha_j))$. It is easy to see that $D$ is independent of a choice of a basis of $R$. We call $D$ the discriminant of $R$. Let $I$ be an ideal of $R$. Let $\mathfrak{f} = \{x \in R | x\mathcal{O}_K \subset R\}$. If $I + \mathfrak{f} = R$, we call $I$ regular. Since regular ideals have nice properties as shown here, it is desirable to have a handy criterion of whether a given ideal of $R$ is regular or not. I came up with the following proposition.
Proposition Let $K$ be a quadratic number field, $d$ its discriminant. Let $R$ be an order of $K$, $D$ its discriminant. It is easy to see that there exists an integer $f \gt 0$ such that $D = f^2d$. Let $I$ be a non-zero ideal of $R$. By the result of this question, there exist unique integers $a, b, c$ such that $I = \mathbb{Z}a + \mathbb{Z}(b + c\frac{(D+ \sqrt D)}{2}), a \gt 0, c \gt 0, 0 \le b \lt a, a \equiv 0$ (mod $c$), $b \equiv 0$ (mod $c$). Then $I$ is regular if and only if gcd$(a, f) = 1$.
Outline of my proof I used the result of this question and this question. A full proof was posted as an answer below.
My question How do you prove the proposition? I would like to know other proofs based on different ideas from mine. I welcome you to provide as many different proofs as possible. I wish the proofs would be detailed enough for people who have basic knowledge of introductory algebraic number theory to be able to understand.