Maedeh Hojabri had gathered thousands of followers on Instagram with videos of herself dancing to Iranian and Western pop music.
On Friday, state TV broadcast Ms Hojabri’s apparent confession.
Social media users shared videos and messages supporting the young dancer, using hashtags such as one that translates as #dancing_isn’t_a_crime.
The Iranian government has strict rules governing women’s clothing and dancing with members of the opposite sex in public is banned, except in front of immediate family members.
Ms Hojabri’s videos showed her dancing at home without the mandatory headscarf, or hijab.
Several other dancers have reportedly also been arrested in recent weeks.
Blogger Hossein Ronaghi commented: “If you told people anywhere in the world that 17 and 18-year-old girls are arrested for their dance, happiness and beauty on charges of spreading indecency, while child rapists and others are free, they would laugh! Because for them, it’s unbelievable!”
One Twitter user wrote: “I’m dancing so that they [the authorities] see and know that they cannot take away our happiness and hope by arresting teenagers and (girls like) Maedeh.”
This is not the first time dancers in Iran have been arrested for dancing.
Earlier this year, an official in the city of Mashhad was arrested after footage emerged showing a crowd of men and women dancing at a mall in the city, while six people were arrested for Zumba dancing in August.
In 2014, six young Iranians who posted a video of themselves dancing to Pharrell Williams’ hit song Happy on the streets and rooftops of Tehran were given suspended sentences of up to one year in prison and 91 lashes.