  We consider nanoflakes of van der Waals ferrielectric CuInP$_2$S$_6$ covered
by an ionic surface charge and reveal the appearance of polar states with
relatively high polarization ~5 microC/cm$^2$ and stored free charge ~10
microC/cm$%2$, which can mimic "mid-gap" states associated with a surface
field-induced transfer of Cu and/or In ions in the van der Waals gap. The
change in the ionic screening degree and mismatch strains induce a broad range
of the transitions between paraelectric phase, antiferroelectric,
ferrielectric, and ferri-ionic states in CuInP$_2$S$_6$ nanoflakes. The states'
stability and/or metastability is determined by the minimum of the system free
energy consisting of electrostatic energy, elastic energy, and a Landau-type
four-well potential of the ferrielectric dipole polarization. The possibility
to govern the transitions by strain and ionic screening can be useful for
controlling the tunneling barrier in thin film devices based on CuInP$_2$S$_6$
nanoflakes. Also, we predict that the CuInP$_2$S$_6$ nanoflakes reveal features
of the controllable negative capacitance effect, which make them attractive for
advanced electronic devices, such as nano-capacitors and gate oxide
nanomaterials with reduced heat dissipation.
