The answer is "it depends".
If you have a very thin and light "rod" (for example, a piece of fishing wire), the material from which that is made has a shear modulus, and it is in principle possible to have a piece of fishing wire vibrate without being held in tension.
However, if you pull both ends tight, like the string of a guitar, then waves will travel along the string more quickly: for a fixed length of string, that means the pitch (frequency) of the sound will increase with tension.
Now if you have a rod made of a stiffer material, for example aluminum or steel, then even when you don't put the rod under tension the sound velocity will be quite high. However, it is still possible to increase the speed of sound in such a rod by putting it under tension.
So the "real" answer is a combination of the two.
Incidentally, $\rho$ is density (mass divided by volume) in the first equation, and density per unit length in the second. You can see this by looking at the dimensions: tension has dimensions of force, but shear modulus has dimensions of force per unit area.