Another easy locally homogeneous counterexample to the original question is given by complex hyperbolic manifolds. thisThis includes compact examples. Complex hyperbolic manifolds are Einstein. Curvature tensor of any manifold decomposes into its Weyl part+Ricci part +scalar part. Thus, a conformally flat Einstein manifold must necessarily have scalar curvature operator and hence have constant sectional curvature in dimensions above 2. This is definitely not the case for complex hyperbolic manifolds so they are not locally conformally flat. Also, as Igor mentioned Chern-Weil theory in dimension 4 says that $sig(M^4)=\frac{1}{12\pi^2}\int_M(|W^+|^2-|W^-|^2)$, where $W^\pm$ are self-dual and anti-self-dual parts of $W$. Complex4-dimensional complex hyperbolic manifolds are conformally semi-flat (i.e they have $W^-=0$) which can be easily derived from the fact that their curvature tensors are $U(2)$ invariant. thusThus, for a closed complex hyperbolic 4-manifold its signature is $sig(M^4)=\frac{1}{12\pi^2}\int_M(|W^+|^2\ne 0$. moreoverMoreover, the integrant is just a constant (by homogeneity). On the other hand, locally conformally flat closed 4-manifolds have signature 0 by the above formula.