As a public educator to children and a yoga instructor to adults, this "I need to be able to do this in order to do that" mindset is the one that really gets me going. One of the biggest things I hear from people after telling them I teach yoga is, "I'm not flexible". How many of you have said this yourself? You didn't have to know how to solve equations before learning math, and you don't need to be strong to start lifting weights, so do you need to be flexible to practice yoga?
Let me repeat that, so I know you understand: You do not HAVE to be flexible to practice yoga.
Will you become a better mathematician by practicing how to solve equations? Probably. Will you build more muscle by lifting more weight? Yes. Then, yes you will become more flexible by practicing yoga; it is a by product of the practice. It's really that simple.
So let me ask you this: is it your inflexibility that prevents you from trying out your first class or is it something else? I'm betting there's some underlying reason you haven't uncovered yet that's stopping you. Think about it and let me know in the comments below.