Step 1: Use symmetry. The slab is symmetric about its central plane, so the field there is zero and, by symmetry, the field at distance \(x\) points away from (or toward) the central plane, perpendicular to it, with equal magnitude on both sides.
Step 2: Apply Gauss's law with a pillbox. Take a Gaussian pillbox straddling the central plane, with its two faces (each of area \(A\)) at \(\pm x\) from that plane. The enclosed volume is \(A(2x)\), so the enclosed charge is
\[q_{enc} = \rho \, A (2x).\]
Step 3: Flux leaves through both faces (field is zero at the central plane, so no flux through the middle), giving total flux \(2 E A\). Gauss's law:
\[2 E A = \frac{\rho A (2x)}{\epsilon_0}.\]
Step 4: Solve for \(E\):
\[E = \frac{\rho x}{\epsilon_0}.\]
\[\boxed{E = \dfrac{\rho x}{\epsilon_0}}\]