We propose certain conditions which are sufficient for the functional law of the iterated logarithm (the Strassen invariance principle) for some general class of nonstationary Markov-Feller chains. This class may be briefly specified by the following two properties: firstly, the transition operator of the chain under consideration enjoys a nonlinear Lyapunov-type condition, and secondly, there exists an appropriate Markovian coupling whose transition probability function can be decomposed into two parts, one of which is contractive and dominant in some sense. The construction of such a coupling derives from the paper of M. Hairer (Probab. Theory Related Fields, 124(3):345-380, 2002). Our criterion may serve as a useful tool in verifying the functional law of the iterated logarithm for certain random dynamical systems, developed eg. in molecular biology. In the final part of the paper we present an example application of our main theorem to the mathematical model describing stochastic dynamics of gene expression.