Consider a system of PDEs given by: \begin{eqnarray} z_x=a(x,y) \text{ and } z_y=b(x,y), \end{eqnarray} where $a,b \in \mathcal{D}'(\mathbb{R} \times \mathbb{R}).$
The condition $a_y=b_x$ in the sense of distribution, is necessary for the existence of the solution of the above PDE(in the sense of distribution). Is this condition sufficient or do we need something extra?
Also what is the corresponding result in higher dimensions?
Proposition 9 in Chapter 4, Paragraph 9 in Topological vector spaces and distributions by J. Horvath provides a version of Poincarè's lemma for disrtributions which, as noted by Warlock of Firetop Mountain in the comment, is necessary and sufficient condition for the existence of solution.
Since it also gives a corresponding version for higher dimensions I'll quote it here:
Let $\{a_i\}_{i=1}^k\subset \mathcal{D}'(\mathbb{R}^n)$, $1\leq k \leq n$. Then there exists a distribution $z\in \mathcal{D}'$ for which $$z_{x_i}=a_i, \quad (1\leq i \leq k)$$ if and only if distributions $a_i$ satisfy relations $${a_i}_{x_j} = {a_j}_{x_i}$$ for $1\leq i,j\leq k, \ i\neq j$.