I'm not 100% sure on this one so you'd have to try it and see if it works.
Nincada doesn't learn Swords Dance, nor does Shedinja by normal methods. However, Ninjask does learn it at level 25. Furthermore, Shedinja only comes by splitting off from Ninjask on evolution.
First, make sure you have an empty spot in your party for Shedinja. Then level up a Nincada to level 25. You'll need to cancel it from evolving (press B) from levels 20-24. Evolve it at level 25 and let it learn Swords Dance. Hopefully Shedinja will get it too!!
Let us know if this works!