Her injury, which prohibited her not just from dancing but from much ordinary movement, has made her reprioritize her life. “When you’re told that you might not dance or even walk, you start to think, Oh my God, what is there?” she said. “What am I? Who am I? Am I more than just a dancer?”

From April to August, the most exercise Ms. Peck had was riding on a stationary bike for 10 minutes without resistance. “For someone who’s so used to being physical?” she said. “I couldn’t even do life things.”

When she was first told that she needed to stop dancing, she called Marika Molnar, the physical therapist and director of Health and Wellness at City Ballet, whom she has worked with since she was 15.

“She went with me to every single doctor,” Ms. Peck said. “I needed someone to be on my side. She kept saying: ‘I know your body better than anyone. They don’t know. Your body just knows how to fix itself. They can’t feel that.’”

Ms. Peck said her gut kept telling her not to have surgery — one doctor, pushing for it, asked if Ms. Molnar would be responsible for Ms. Peck if she were to become paralyzed afterward.

Ms. Peck also worried that the surgeons she spoke to, who were opting for disc replacement or fusion, didn’t fully understand her profession; the use of épaulement, or the position of the shoulders, head and neck, is imperative to a ballet dancer. “They’d say, ‘Oh, it’s just one segment, so if you get a fusion, you won’t even notice that you don’t need that,’” she said. “But I’m not a football player. I need to be able to use my upper body.”