In the first part of the paper we characterize systems of first order nonlinear differential equations whose space of solutions is an sl2(C)-module. We prove that such systems, called Ramanujan systems of Rankin-Cohen type, have a special shape and are precisely the ones whose solution space admits a Rankin-Cohen structure. In the second part of the paper we consider triangle groups ∆(n, m, ∞). By means of modular embeddings, we associate to every such group a number of systems of non linear ODEs whose solutions are algebraically independent twisted modular forms. In particular, all rational weight modular forms on ∆(n, m, ∞) are generated by the solutions of one such system (which is of Rankin-Cohen type). As a corollary we find new relations for the Gauss hypergeometric function evaluated at functions on the upper half-plane. To demonstrate the power of our approach in the non classical setting, we construct the space of integral weight twisted modular form on ∆(2, 5, ∞) from solutions of systems of nonlinear ODEs.