  Let $\rho\colon G\to \mathrm{GL}_n(K)$ be an continuous irreducible
representation of a compact group over a complete discretely valued field $K$.
Let $W_i,W_j$ be two irreducible subrepresentations of $\overline{\rho}^{ss}$,
the semisimplification of the residual representation. We study the structure
of the $G$-stable lattices $\Lambda\subseteq K^n$ with a view to understanding
the question of when $\rho$ realises a non-split extension of $W_i$ by $W_j$.
  In particular, we introduce the notion of a maximal $G$-stable lattice and
prove that any non-split extension of $W_i$ by $W_j$ that can be realised by
$\rho$ can also be realised by a maximal lattice. As applications, we give a
new proof and a strengthening of Bella\"iche's generalisation of Ribet's Lemma,
which assures the abundancy of non-split extensions that can be realised by
$\rho$. On the other hand, we also show that, if the representations $W_i, W_j$
occur with multiplicity one in $\overline{\rho}^{ss}$, then $\rho$ can realise
at most one non-split extension of $W_i$ by $W_j$.
