Transgender people often suffer gender dysphoria. You're correct that it's possible that gender dysphoria might be a downstream effect of society. Namely, we are an extremely gender-segregated society. There's truly only one way to be a man, although there are multiple ways to be a woman. People feel forced and confined to a very small subset of behavior and self-expression.
Existing between genders is, unfortunately, untenable. Society is just not built for that. But existing as the opposite gender seems to be perfectly doable. I'm not saying that it's that simple and all transgender people would disappear if we live in a society with no gender roles or expectations, but certainly they heavily feel the pressure of those gender roles and expectations.