We present a lattice model for polymer solutions, explicitly incorporating interactions with a bath of solvent and cosolvent molecules. By exploiting the well-known analogy between polymer systems and the O(n)-vector spin model in the limit n→0, we derive an exact field-theoretic expression for the partition function of the system. The latter is then evaluated at the saddle point, providing a mean-field estimate of the free energy. The resulting expression, which conforms to the Flory-Huggins type, is then used to analyze the system's stability with respect to phase separation, complemented by a numerical approach based on convex hull evaluation. We demonstrate that this simple lattice model can effectively explain the behavior of a variety of seemingly unrelated polymer systems, which have been predominantly investigated in the past only through numerical simulations. This includes both single-chain and multichain solutions. Our findings emphasize the fundamental, mutually competing roles of solvent and cosolvent in polymer systems.