First of all, it is known that the additive group of $\mathcal{O}_K$ is a free $\mathbb{Z}$-module of rank $n=[K:\mathbb{Q}]$. It follows by general theorems on free $\mathbb{Z}$-modules that the additive group of any ideal $\mathfrak{a}\subseteq\mathcal{O}_K$ is a free $\mathbb{Z}$-module of rank $\leq n$. Now assume $\mathfrak{a}\neq 0$ and choose an element $a\in\mathfrak{a}-\{0\}$. Let $\beta_1,...,\beta_n$ and integral basis of $K$. It is obvious that
$$G:=\{k_1a\beta_1+...+k_na\beta_n \ : \ k_i\in\mathbb{Z}\}$$
is a free $\mathbb{Z}$-module of rank $n$ (a $\mathbb{Z}$-basis is clearly $a\beta_1,...,a\beta_n$). But $G$ is also a subgroup of $\mathfrak{a}$ because each $a\beta_i$ is an element of $\mathfrak{a}$. Again by general theorems on free $\mathbb{Z}$-modules, we have
$$n=\text{rank } G \leq \text{rank } \mathfrak{a} \leq n\text{.}$$
Hence $\text{rank }\mathfrak{a}=n$, so any $\mathbb{Z}$-basis of $\mathfrak{a}$ consists of $n$ elements.