I'm going to try to make this short, but there's quite a bit of stuff to explain.
Me: Male, 17, Junior
Her: Female, 17 (assumed), Junior
So, this girl moved from a nearby state to the city where I live in before the school year began, and when school seated, her assigned seating in physics for the semester was at my table group. I got a crush on her and asked her to homecoming (this is back in October), but she said she was going to be gone the day (visiting her old state) but she said it was sweet of me to ask. We had a conversation afterward about where she was from and the new place where we both reside, and that gave me some hope. However, she wasn't gone on the day of homecoming so I have my doubts (there's a chance she left after the school day ended). For about a week she basically went out of her way to avoid me, but it got back to normal after.
Then, in November, we were assigned the same group for a month long project and conversations were friendly from there. We eventually exchanged numbers in a group chat for the project (there was one other person in the group) and we ended up talking outside of the chat (but mostly about physics), and the conversations were very friendly. In the second semester, her seat changed so we aren't in the same groups anymore, but we text every once in a while to discuss physics homework and she is very friendly now with her texts and she says hi when we walk by each other in the hallway.
What I want to do is ask her out, but I feel like I'm dangerously close to the friendzone. I could probably just start a conversation with her during lunch, but it would be kind of annoying to her because I'm just interrupting her studying out of the blue with nothing to talk about. The final option I think I have is this: In my class, if you miss a lab, you have to stay after school with another student who already did the lab and do it then. I'm thinking I could just do that, but there's a chance we don't do the lab together.
tl;dr: She kind-of rejected me and we're on good terms at the moment, but there are complications for me asking her out.
Question(s)/Where I Want To Be:
How can I ask her out? Do I ease it into a conversation?
How I want the situation to be at the end: She knows I like her and I have either gone out with her or she has said no.
My expectation: We go out, but she wants to be friends (idk, this is just what happens most often with my friends and their relationships)
EDIT: The way that I approached her was by walking up to her after class in the hallways and just straight-up asking her. I'm asking how I can change this approach to be more successful and if I did it wrong.
UPDATE: She missed a lab and I helped her make it up after school and that went well, where do I go from here?