In case you have some physics background, let me reformulate your problem as follows: find the electric potential $\phi$ produced by a charge density $\rho$ which vanishes outside the ball $B$ of radius $a$ (such that $\phi$ decays as at most $r^{-1}$ at infinity, and its radial derivative decays faster that $r^{-1}$). The charge $dq$ placed at the point $\mathbf{r'}=(x',y',z')$ creates the potential $\displaystyle \frac{1}{4\pi}\frac{dq}{|\mathbf{r}-\mathbf{r'}|}$, where
$$|\mathbf{r}-\mathbf{r'}|=\sqrt{(x-x')^2+(y-y')^2+(z-z')^2}.$$
Therefore the potential you are looking for will be given by
$$\phi(x,y,z)=\frac{1}{4\pi}\int\!\!\!\int\!\!\!\int_B\frac{\rho(\mathbf{r'})\,dx'dy'dz'}{|\mathbf{r}-\mathbf{r'}|}.\tag{1}$$
At large distances, it will coincide with the potential of a point-like charge placed at the origin and equal to the total charge of $B$. This has necessary decay properties ($\sim r^{-1}$) so the problem is solved.
If you don't have physics background, take the formula (1) and apply to it the operator $\nabla^2$. What one has to show is that
$$ \frac{1}{4\pi}\nabla^2\left(\frac{1}{|\mathbf{r}-\mathbf{r'}|}\right)=\delta(\mathbf{r}-\mathbf{r'}),$$
i.e. that $\frac{1}{4\pi|\mathbf{r}-\mathbf{r'}|}$ is the Green function of three-dimensional Laplace operator. This can be done using divergence (Gauss-Ostrogradsky) theorem.