Folk dance competition (フォークダンスで恋合戦の巻) is episode 502 of the 1981 Ninja Hattori-kun anime.
Kenichi is performing a folk dance with his classmates at the village fete, so he desperately wants a chance to dance with Yumeko - and Kemumaki is interfering. It's Hattori to the rescue!
It all starts at the Mitsuba house, when Kenichi tells Hattori that he is taking part in a folk dance at the village fete. Hattori asks if Kenichi is dancing with forks (ha ha ha), and Kenichi says that it is a foreign dance where a gentleman and a lady get together and dance around a fire. Hattori, Shinzo and Shishimaru are fascinated, but Kenichi is gloomy because he isn't able to dance with Yumeko Kawai. He then launches into his story at school, where he and his classmates are rehearsing. Just before Kenichi nabs Yumeko (who is dancing with Kemuzou Kemumaki), the bell rings. Kemumaki walks Yumeko to class, much to Kenichi's mingled fury, sadness and horror. The scene switches back to the bedroom, where Kenichi says this happens every day. Hattori suspects that it is Kenichi's bad luck streak that stops him from dancing with the girl of his dreams.
At Kemumaki's flat, Kemumaki and Kagechiyo laugh to themselves that Kenichi didn't get to dance with Yumeko and Kemumaki tells Kagechiyo that he must do the same thing tomorrow. We don't know what the feline is supposed to do... yet.
Next day, at school, the kids are rehearsing, supervised by Mr. Koike. Kenichi waits impatiently for a chance to dance with Yumeko. Suddenly, Kagechiyo turns up on the school roof. He then uses a large magnet and turns the clock to the end of the period. The bell automatically rings a split millisecond before Kenichi gets to dance with Yumeko. Kemumaki takes the mickey out of poor Kenichi.
Back at home, Kenichi cries out in disbelief and grief that he wanted to dance with the girl of his dreams. Hattori ponders the problem, just as Shinzo and Shishimaru butt in and tell Hattori that they suspect that Kemumaki was up to no good as usual. Hattori and Kenichi are astonished, and Hattori vows to solve the problem.
During the next rehearsal, Kagechiyo turns up again. Just as he is about to turn the clock, Hattori sends some ninja stars and Kagechiyo misses the target. Sadly, Kemumaki gets some superglue and attaches Yumeko to him. As Yumeko and Kemumaki get stuck to each other, the period is dismissed prematurely as Mr Koike chivvies Yumeko and Kemumaki to the first-aid room. Kenichi stares incredulously as Hattori says "Even though he's our enemy, I must say he's completely brilliant!"
Kenichi, still struggling to come to terms with this disaster, asks Hattori to do something. Hattori promises to help Kenichi on the day of the fete.
Next day, Hattori, Shinzo, Shishimaru and Mr and Mrs Mitsuba come to watch the folk dance. As Shinzo and Shishimaru stay with their foster parents, Hattori takes a net with him and spies on the dancers. He puts the net on his head and grabs Kemumaki by the arms. Acting as his puppet, Hattori pulls a horrified Kemumaki out of Yumeko's path. The crowd laughs - and then the romance starts as Kenichi starts to dance with Yumeko. Hattori forces Kemumaki to dance with him until the folk dance stops, while Kenichi and Yumeko have the time of their lives.