Hyoroku's Dream Tale
I haven't seen the film, in fact I'm not even sure it's available. There's just one review on IMDB and another one (in German) on Letterbox). I stumbled upon it looking for old and obscure horror films, and it turns out that this isn't horror at all. I don't why someone put it in the horror genre, but it's actually a family/fantasy comedy. I had to google translate a German review to be sure.