If I had a teacher who taught me during sophomore year then half of junior year before leaving my school, would she qualify as a teacher that I could ask for a letter of recommendation?
Yes, she could definitely write your letter of rec.
Yup, as long as she’s willing to she absolutely could!