Your conclusion is valid, and for this we only need to assume that $\varphi(3n)$ is divisible by $3$. Indeed, this weaker condition is equivalent to the existence of a prime divisor $p\mid n$ that is either $3$ or congruent to $1$ modulo $3$. It is known that $p$ is the norm of ansome Eulerian integer $z=x+y\frac{1+i\sqrt{3}}{2}$. Multiplying $z$ with a sixth root of unity, we can achieve that $0<\arg(z)<\pi/3$. Then, $x$ and $y$ are positive integers satisfying $p=x^2+xy+y^2$, and sohence $n$ is three times the Heronian mean of $(n/p)x^2$ and $(n/p)y^2$.