Suppose $a,m\in\mathbb Z_{\ge2}$. Let's consider the ring $A=\mathbb Z[(1+\alpha)/2]$, where $\alpha^2=1-4a^m$, and the ideal $I=(a,(1+\alpha)/2)$, we need to show that $I^n$ is non-principal when $0<n<m$.
It's easy to show by induction that $I^n=(a^n,(1+\alpha)/2)$, and we have $A/a^nA\cong\mathbb Z/a^n\mathbb Z\times\mathbb Z/a^n\mathbb Z$, $A/I^n\cong\mathbb Z/a^n\mathbb Z$. Note that $I^m=((1+\alpha)/2)$, which is principal.
Since the case is a bit more general than computations in specific quadratic fields, maybe there's more general methods to determine whether an ideal is principal.
Any help is welcome. Thanks!