First of all it is good to differentiate what can be curved. One way to deal with Einsteins equations is to choose a space-time foliation (global when possible). In the Friedmann models one has a set isometries which define the homogeneus and isotropic spatial hypersurfaces, it can be shown that these hypersurfaces have a normal vector field $n^\mu$ which is geodesic $(n^\nu\nabla_\nu{}n^\mu=0)$ where $\nabla_\nu$ is the connection compatible with the Friedmann metric $g_{\mu\nu}$ (signature $(-1,1,1,1)$), i.e., $\nabla_\alpha{}g_{\mu\nu}=0$.
Given this choice of hypersurfaces we have the projector $\gamma_{\mu\nu}\equiv{}g_{\mu\nu}+n_\mu{}n_\nu$ which acts as a metric in the spatial sections. This metric we have a unique covariant derivative (in the hypersurfaces) $D_\alpha\gamma_{\mu\nu} = 0$, and this derivative in turn defines a Riemann tensor on the spatial section $$(D_\mu{}D_\nu-D_\nu{}D_\mu)v_\alpha = \mathcal{R}_{\mu\nu\alpha}{}^\beta{}v_\alpha,$$ where $\gamma_\alpha{}^\beta{}v_\beta=v_\alpha$. For the Friedmann metric we have that $$\nabla_\mu{}n_\nu = \Theta_{\mu\nu} = \frac{\Theta}{3}\gamma_{\mu\nu},$$ where $\Theta_{\mu\nu}$ is the extrinsec curvature and $\Theta$ its trace.
In short, the notion of a foliation induces a concept of curvature and a extrinsec curvature in the hypersurfaces in a way that the four dimensional Riemann tensor $$R_{\mu\nu\alpha}{}^\beta{}v_\beta = (\nabla_\mu\nabla_\nu-\nabla_\nu\nabla_\mu)v_\alpha,$$ is split in $\mathcal{R}_{\mu\nu\alpha}{}^\beta{}v_\alpha$ plus combinations of $\Theta_{\mu\nu}$ and $D_\mu$, i.e., $$R_{\mu\nu\alpha\beta} = \mathcal{R}_{\mu\nu\alpha\beta} + 2\Theta_{\mu[\alpha}\Theta_{\beta]\nu} - 4(D_{[\mu}\Theta_{\nu][\alpha}n_{\beta]} + D_{[\alpha}\Theta_{\beta][\mu}n_{\nu]}) + 4(n^\sigma\nabla_\sigma(n_{\mu}\Theta_{\nu][\alpha}n_{\beta]}) + n_{[\mu}\Theta_{\nu]}{}^\sigma\Theta_{\sigma[\alpha}n_{\beta]}),$$ where $T_{[\mu\nu]} = (T_{\mu\nu}-T_{\nu\mu})/2$.
All this said, we can see that it is possible to have a zero spatial curvature (Ricci tensor) $\mathcal{R}_{\mu\alpha} = 0$, but a non-zero four dimensional $R_{\mu\alpha}$. For a Friedmann metric we have $D_\mu\Theta=0$, $\mathcal{R}_{\mu\nu} = 2K\gamma_{\mu\nu}$ and $D_\mu K=0$. Contracting the indexes in the expression for the Riemann tensor in terms of the foliation objects and using the Friedmann simplifications we obtain $$R_{\mu\alpha} = \mathcal{R}_{\mu\alpha} + \frac{\dot{\Theta}+\Theta^2}{3}\gamma_{\mu\nu} - \left(\dot{\Theta}+\frac{\Theta^2}{3}\right)n_\mu{}n_\alpha,$$ where $\dot{\Theta} \equiv n^\sigma\nabla_\sigma\Theta$. Thus, the Einsteins tensor is simply $$G_{\mu\nu} = \mathcal{G}_{\mu\nu} + \frac{\mathcal{R}n_\mu{}n_\nu}{2} -\left(\frac{2\dot{\Theta} + \Theta^2}{3}\right)\gamma_{\mu\nu} + \frac{\Theta^2}{3}n_\mu{}n_\nu ,$$ where $G_{\mu\nu} = R_{\mu\nu}-g_{\mu\nu}R/2$ and $\mathcal{G}_{\mu\nu} = \mathcal{R}_{\mu\nu}-\gamma_{\mu\nu}\mathcal{R}/2$ and consequently the Einsteins equation $G_{\mu\nu}=\kappa T_{\mu\nu}$ ($\kappa = 8\pi G$) have the time-time component (the so called Friedmann equation) $$\frac{\mathcal{R}}{2}+\frac{\Theta^2}{3} = \kappa\rho,\quad\Rightarrow\quad H^2 = \frac{\kappa\rho}{3}-K,$$ where $\rho = n_\mu{}n_\nu{}T^{\mu\nu}$, $\Theta = 3H$. Therefore, we have that $H^2 = {\kappa\rho}/{3}$ if and only if $K=0$, which defines the critical density. Then, finally the if the universe has energy density equal to critical density then the curvature of the spatial hypersurfaces of homogeneity and isotropy is null.
Note, however, that the spatial curvature depends on the choice of hypersurfaces and even if $\mathcal{R}_{\mu\nu}$ is null in the usual foliation we can always find another foliation in which this is not true. In Friedmann this is not a issue since the foliation is induced by the symmetries. However, not that, in de Sitter metric any other choice of foliation gives also homogeneous and isotropic hypersurfaces, in this case different choices of foliation can leads to flat, hyperbolic and spherical spatial sections.
Additionally, the Einsteins equations relates the energy momentum density with the Ricci tensor. Therefore, if the energy density is zero the Einsteins equations leads to zero Ricci tensor, however, one can still have non zero Riemann tensor $R_{\mu\nu\alpha\beta}$.