Sure, but ask your spouse if they would go with you. Tell them how much it means and that it's good exercise. If they love you they'll go, if not then yes go without them.
It is completly fine to go by yourself, but I would recomend telling your partner that you are learning to dance. Some woman find it sexy that a man knows how to dance. She might be one.
I go ice dancing and there are several married men there whose wives don't take part because they choose not to. There's no law that husbands and wives have to share all their hobbies.
My husband doesn't skate and nor does the wife of a man who I regularly dance with. None of us have an issue with it.
It's best to let the other person know. You don't want to keep them in the dark because they will become suspicious of your activities. Why not just invite your partner. It takes two to tango.