Dan Oniroku: Shôjo mokuba-zeme (1982)

AKA Girl and the Wooden Horse Torture

Nami is a masochistic high school student who is attacked and nearly raped by a gang of thugs before being rescued by the handsome teacher Muraki. The near-accident triggers Nami’s bizarre hallucinations, and she imagines herself involved in various S&M situations with Muraki, in which she is beaten, forced to urinate, and tortured on the wooden horse that gives the film its title. The hallucinations become progressively more real (and exciting) for Nami, and soon Muraki is accused of raping her and losing his position as a teacher.