I suppose the best answer I can give is to tell you that it is natural to want to have sex with a teacher. Most guys want to do it at one point (to be perfectly honest, I am no exception even though I have never even tried) and it is not something that you should be worried over. However, asking if she wants to have sex with you is a VERY blunt and forward point which she might find not only as crass, but highly offensive. This could lead to punishment in the forms of expulsion, or even litigation against you in the form of a sexual harassment lawsuit. But lets say for argument's sake that you DO end up having CONSENSUAL sex with this teacher. The consequences would be quite dire. If you are underage, she has jail-time to face, and to be known as a sexual offender, and will no doubt be fired. It will affect YOU because you could easily be punished, and if not certainly will face the jeers of your peers (rhymes...).
Just, think about your actions in depth and how they may turn out in a negative light. We all have impulses to do these things, it is part of being a pubescent child. The important part of learning and growing is knowing that these are just impulses, and can be ignored with help from a side activity, or perhaps by taking your mind off of it. It can be difficult, but it can be done. Hope this helped.