Recent works have used the theory of modular forms to establish linear congruences for the partition function and for traces of singular moduli. We show that this type of phenomenon is completely general, by finding similar congruences for the coefficients of any weakly holomorphic modular form on any congruence subgroup $\Gamma_0 (N)$. In particular, we give congruences for a wide class of partition functions and for traces of CM values of arbitrary modular functions on certain congruence subgroups of prime level.