Given an abelian group $G$ and a system of equations $$a_1 = n^1_1 y_1 + ... + n^1_r y_r$$ $$...$$ $$a_s = n^s_1 y_1 + ... + n^s_r y_r$$ for $a_i \in G$ and $n^i_j \in \mathbb{Z}_{\geq 0}$, under what conditions does there exist a group containing $G$ as a subgroup in which this system is solvable? In particular, can the conditions be stated in the first-order logic of group theory?
For example, a system $$a_1 = y_1$$ $$a_2 = y_1$$ is solvable in an extension if and only if $a_1 = a_2$, so its conditions can be stated in first-order logic. Furthermore, any single equation $a = n_1 y_1 + ... + n_r y_r$ with at least one $n_i \neq 0$ can be solved in some extension of any group, since in $H = (G \times \mathbb{Z}) / \langle (a, -n_i)\rangle $ we have $y_i = (0, 1)$ as a solution, with $G$ embedding into it by $\alpha: G \rightarrow H: g \mapsto (g, 0)$, as described by this answer
Let $T:\mathbb{Z}^s\to\mathbb{Z}^r$ be the homomorphism with matrix $(n_i^j)$ and let $f:\mathbb{Z}^s\to G$ be the homomorphism that sends the $j$th basis vector to $a_j$. Your question is then when there exists an injective homomorphism $i:G\to H$ and a homomorphism $g:\mathbb{Z}^r\to H$ such that $gT=if$.
Clearly a necessary condition is that $f$ must vanish on $\ker T$. I claim that this is also sufficient. Indeed, let $H$ be the pushout of $f$ and $T$ with $i:G\to H$ and $g:\mathbb{Z}^r\to H$ the structure maps. Explicitly, $H$ is the quotient of $\mathbb{Z}^r\oplus G$ by the subgroup consisting of elements of the form $(T(x),-f(x))$ for $x\in\mathbb{Z}^s$, and $i$ and $g$ are given by the inclusions into the direct sum $\mathbb{Z}^r\oplus G$ composed with the quotient map. This satisfies $gT=if$, so the only question is whether $i$ is injective. If $i(x)=0$, that means there exists some $y\in\mathbb{Z}^s$ such that $(0,x)=(T(y),-f(y))$. This means $y\in\ker T$, so by hypothesis, $f(y)=0$, so $x=0$.
So your desired extension exists iff $f$ vanishes on $\ker T$. For any specific element $x\in\ker T$, the condition that $f(x)=0$ is just a certain equation the $a_j$ must satisfy. Picking a finite set of generators for $\ker T$, you get a finite set of equations in the $a_j$ which is equivalent to the existence of your desired extension.