The 18-year-old underwent an invasive procedure without alerting Spain’s medical team, surprising the federation.