If we focus only on density, then we can falsely deduce your line of reasoning. However, solid conducts sound faster than air, because of having an extremely huge elasticity (bulk modulus). As a result of which sqrt (bulk modulus/density) of solid is still bigger than air.
Now, if we look only at air and helium, their B is pretty much the same, but He has smaller density. So, sqrt (B/density) of air will be smaller than helium. So, Helium will have higher velocity, meaning higher frequency (i.e. pitch)