What is the set of triangular numbers mod $n$?
Fix $n=p_1^{\alpha_1}\ldots p_k^{\alpha_k}$. We want to know for which $b$ the equation $$ a(a+1)/2=b $$ has a solution modulo $n$. By the Chinese remainder theorem, this happens iff it has a solution mod $p_i^{\alpha_i}$ for each $i$. Consider one of these prime powers. If $p_i=2$ then there is always a solution, as mentioned in your question. Suppose $p_i\neq2$. The equation is equivalent to $$ (2a+1)^2=8b+1. $$ Let $8b+1=x_ip_i^{\beta_i}$ where $p_i\not\mid x_i$. If $\beta_i\geq\alpha_i$ we can take $2a+1=p^{\alpha_i}$. Otherwise $\beta_i$ must be even, and in this case by Hensel's lemma, there is a solution iff $x_i$ is a quadratic residue mod $p_i$. Therefore the residues of triangular numbers mod $n$ are exactly $$ \left\{b\,\left|\,\left(\frac{x_i}{p_i}\right)=1\text{ and }\beta_i\text{ is even for each }i\text{ with }\beta_i<\alpha_i\text{ and }p_i\neq2\right.\right\} $$ where $\left(\frac{x}{p}\right)$ is the Legendre symbol. I don't think there is a closed form expression for the Legendre symbol, but quadratic reciprocity gives an algorithm for calculating it.