Crystallographic background
A unit cell cannot contain parts of atoms from a formula unit, otherwise it would not be a geometric unit of repeatability.
The simplest condition arising from translational symmetry is that the total number of atoms present in the unit cell must be either equal to or be a multiple of the number of atoms in the chemical formula, which is an equivalent to the integer number of formula units per unit cell: $Z \in \mathbb{N}.$
Note, however, that the asymmetric unit (crystallographically independent region) contains the $Z/n$th part of the atoms of the formula unit, where $n$ is the order of the crystallographic point group.
Thus, the asymmetric region may contain an integer number of formula units, one formula unit or its fractional part, meaning that some atoms located on symmetry elements, are "divided" across several asymmetric regions.
Data precision
It appears you are using the correct formula for the crystallographic density $ρ$ (I strongly encourage not to use $d$ as a symbol for density as in crystallography $d$ is reserved for spacing between planes):
$$ρ = \frac{MZ}{N_\mathrm{A}V}$$
where $M$ is molar mass, $N_\mathrm{A}$ is Avogadro's number and $V$ is the unit cell volume.
Although you can use the exact value for $N_\mathrm{A} = \pu{6.02214076E23 mol-1}$ and a precise tabulated value $M(\ce{FeO}) = \pu{71.844 g mol-1},$ note that you are given both $a$ and $d$ (experimental data) to the single significant figure, which prohibits your answer from being more precise than these parameters, and you must present a rounded number $Z = 4$ and not $Z = 4.18,$ which doesn't make either crystallographic or mathematical sense.
In real life situation there always will be a systematic difference between the measured and crystallographic densities due to the presence of defects, and the deviation of $Z$ from the integer value is often due to statistically filling of the proper point group by the atoms of a different kind.