No, a conformally-flat metric doesn't imply the vanishing of the Ricci tensor. As a very simple example, the flat space FLRW metric
$$\tag{1}
ds^2 = dt^2 - a^2(t) (dx^2 + dy^2 + dz^2),
$$
is conformally-flat. Just use the conformal time: $d\eta = \frac{1}{a(t)} \, dt$, to get the following metric:
$$\tag{2}
ds^2 = a^2 (d\eta^2 - dx^2 - dy^2 - dz^2).
$$
This metric is obviously conformal to the Minkowski metric, so it is "conformally-flat", and yet the associated Ricci tensor is not 0. This metric is a cosmological solution to the Einstein equation with a perfect fluid as matter source, and may even include a cosmological constant:
$$\tag{3}
R_{\mu \nu} - \frac{1}{2} \, g_{\mu \nu} \, R + \Lambda \, g_{\mu \nu} = -\, \kappa \, T_{\mu \nu}.
$$
If $R_{\mu \nu} = 0$, then $R \equiv g^{\mu \nu} \, R_{\mu \nu} = 0$, so (3) would reduces to
$$\tag{5}
\Lambda \, g_{\mu \nu} = -\, \kappa \, T_{\mu \nu},
$$
which is not true for a general perfect fluid tensor.
Conformally flat means that the Weyl conformal tensor vanishes: $C^{\lambda}_{\: \kappa \mu \nu} = 0$.
The conclusion to your question is that your assumption that your metric should be Ricci-flat is just wrong.
EDIT: By the way, for a proper choice of function $\phi(x)$, your metric is the de Sitter metric in some cartesian coordinates system, with any cosmological constant $\Lambda$. In that case, you get
$$\tag{6}
R_{\mu \nu} - \frac{1}{2} \, g_{\mu \nu} \, R + \Lambda \, g_{\mu \nu} = 0 \qquad \Rightarrow \qquad R_{\mu \nu} = \Lambda \, g_{\mu \nu}.
$$