There's no evidence to sugest that's true. All the research says lifting weights through a full range of motion will increase your flexibility, certainly not impair it.
If you don't use a full range of motion for whatever reason, the weight training you do won't increase your flexibility much.
But there's still nothing in the training itself that would limit your flexibility in any way.