Let $(R,\mathfrak m,k)$ be a noetherian local ring and $M$ an $R$-module of finite length. Then $(0)$ is irreducible in $M$ if and only if $\dim_k\operatorname{Soc}(M)=1$.
"$\Rightarrow$" If $\dim_k\operatorname{Soc}(M)\ge2$, then pick two one-dimensional subspaces of $\operatorname{Soc}(M)$ which intersect trivially.
"$\Leftarrow$" First note that $\operatorname{Soc}(M)\subseteq M$ is essential, that is, if $N$ is a non-zero submodule of $M$, then $N\cap \operatorname{Soc}(M)\ne0$. There are two cases:
$\mathfrak mN=0$. Then $N\subseteq \operatorname{Soc}(M)$ and thus $N\cap\operatorname{Soc}(M)=N\ne0$;
$\mathfrak mN\ne0$. We know that there is $n\ge1$ such that $\mathfrak m^nM=0$. In particular, $\mathfrak m^nN=0$. Let $t\ge 1$ be minimal with the property $\mathfrak m^tN=0$. Then $\mathfrak m^{t-1}N\ne0$ and from $\mathfrak m^tN=0$ we get $\mathfrak m^{t-1}N\subseteq \operatorname{Soc}(M)\cap N$.
If $N_1\cap N_2=(0)$, and $N_i\ne0$, we have $N_i\cap \operatorname{Soc}(M)\ne0$ and from $\dim_k\operatorname{Soc}(M)=1$ we get $N_i\cap\operatorname{Soc}(M)=\operatorname{Soc}(M)$, so $\operatorname{Soc}(M)\subseteq N_1\cap N_2$, a contradiction. $\square$
In the question take $M=R/\mathfrak q$. Note that $\mathfrak q$ irreducible is equivalent to $(0)$ irreducible in $M$, and from the result above this is equivalent to $\dim_k\operatorname{Soc}(M)=1$. From Matlis duality this is also equivalent to $M^{\vee}$ cyclic. But in our case $M^{\vee}=\operatorname{Hom}_R(M,R)$ (since $E_R(k)=R$ for artinian Gorenstein local rings) and we are done.