Céline Sciamma has brought a superbly elegant, enigmatic drama to Cannes that compels a shiver of aesthetic pleasure and fear. With this new story, she demonstrates a deeply satisfying new mastery of classical style to go with the contemporary social realism she showed in Girlhood (2014) and Tomboy (2011).

The setting is 18th-century Brittany, where an Italian noblewoman (Valeria Golino) has engaged what is officially a ladies’ companion for her beautiful daughter, Héloïse (Adèle Haenel), who has just come out of a convent and is recovering from the loss of her sister. The companion, Marianne (Noémie Merlant), is actually an artist, and the countess wishes her to paint a portrait of Héloïse in secret, to be shown to a wealthy prospective husband in Milan, because headstrong Héloïse would never consent to sitting for any such picture. A previous artist was fired.

Marianne and Héloïse duly go out for walks, with Marianne making intense, furtive scrutiny of her mistress’s face, committing it to memory in order to put it on paper in private. Yet Héloïse is aware of these intimate glances, and perhaps begins to misinterpret them. Or is she, in fact, not misinterpreting them? Soon, Marianne becomes uneasily preoccupied with her predecessor’s abandoned, half-finished work – a disturbingly fractured image. She confesses the ruse and declares herself angrily dissatisfied with her own specious and facile portrait, spoiling it to make it look like a Francis Bacon nightmare. And having allowed us to perceive the blandness of that first attempt, Sciamma cleverly shows how the second portrait differs intriguingly from the pose that Héloïse grants Marianne as their relationship begins to thaw. Her pictured face looks indirectly, askance at the viewer but with a more disapproving look than exists in real life, without the intriguing half-smile that Adèle Haenel has. Their relationship develops, and they also conspire to help the maidservant Sophie (Luàna Bajrami) with a personal problem.

Facebook Twitter Pinterest Haunting image ... Adèle Haenel in Portrait of a Lady on Fire. Photograph: Cannes film festival

I was on the edge of my seat. Portrait of a Lady on Fire has something of Alfred Hitchcock – actually two specific Hitchcocks: Rebecca, with a young woman arriving at a mysterious house, haunted by the past, and also Hitchcock’s Vertigo, with its all-important male gaze. Sciamma flips it to a female gaze, a gaze of connoisseurship, of artistic appropriation, of erotic rapture. And that gaze is reciprocated. Sciamma may well have intended an echo of Scottie’s friend Midge Wood in Vertigo, the glasses-wearing artist who to Scottie’s discomfiture paints a picture of herself in the pose that she knows has become an obsession for him.

There are flashes of real fear. The title refers to a separate picture that Marianne has painted of Héloïse in an eerily stark landscape setting, some flames coming from the hem of her dress. Given her propensity for destroying work she finds unpleasing, or perhaps as evidence of forbidden desire, the title has in fact a faint ambiguity: is it the portrait, or the lady, who is going to be burnt? The exact, real-world moment that this painting is based on is uncanny and disturbing: like a bad dream depicted with crystalline clarity. Moreover, Marianne keeps having visions of Héloïse in her sacrificial wedding dress – and it is scarier than any ghost story.

Sciamma brings the erotic together with the cerebral. A discussion of the Orpheus and Eurydice myth turns on how Orpheus could possibly have turned to look, fatally, at his love. Could it be, as Marianne thinks, that he had a lover’s view, and not an artist’s: that he wanted the passionate, authentic fleeting intensity of the real image, rather than that frozen varnished permanence that pictures show us, and that we somehow assume we can approximate with monogamous love?

The final scenes set in the art gallery and the opera house are gripping: a past obsession simultaneously sour and yet vividly alive. What did it remind me of? De Laclos’ Dangerous Liaisons? Nicolas Roeg’s Bad Timing? I don’t know. But what a story of desire.

•Portrait of a Lady on Fire screened at the Cannes film festival.