Teaching a student (as a TA) when there is flirting, etc. and mutual interest
I am performing my job, but I am worried that if things go bad with us she'll claim sexual harassment. What should I do?


Don't let things go bad.  I.e., stop talking about sex, try to hide your feelings, don't flirt, etc.  As long as she is in your class, you have a professional obligation to treat her the same as your other students, regardless of whether she welcomes your interest.  Doing anything else is dangerous.  (Even if she makes no complaint, other students may raise the issue with the administration, if they are upset by it or suspect favoritism.)

In principle, you could try to change your teaching assignment to another class.  However, I'd strongly recommend against asking for this.  It might not be possible (maybe there's nobody available to switch with you), in which case you'll be in a real mess if you have implicitly announced that your current assignment is untenable.  Any changes will be disruptive, which will annoy the professor teaching the class as well as whoever handles the teaching assignments or has to switch with you.  Plus the teaching change will be public enough that it will probably create rumors of impropriety.