What's a religious practice that you have seen included in a myth or folklore story in an interesting way?
I've been sitting on this question, because I keep feeling like I'm forgetting some great example and waiting for it to come to me! But I'm biting the bullet; let's go. "Religious" is a complex term at the best of times, and no less when bringing it to dine with "myth or folklore" haha — but I'll make it even worse with an example that is neither entirely a myth nor a piece of folklore: the story of Cupid and Psyche.
(The Reunion of Cupid and Psyche by Jean Pierre Saint-Ours)
The Numidian (modern-day Algeria) author Apuleius includes this story in his larger Latin work Metamorphoses, written sometime after 150 AD. It's likely that at least parts of the tale predate his writing, but his work is the first extended version in the written record. It's been variously analyzed as a work of literature, mythology, and folklore.
But what's the religious practice? With the hopes of retaining your interest, I nonetheless offer the rather dull answer of "prayer." But you did say interesting, and the prayer in this story is interesting. It says a lot about how and why ancient prayer worked. There are lessons throughout this story for the curious; but those curious about the gods and those curious about magic will be especially enriched.
I won't recount the full plot of Cupid and Psyche. You can read full and abbreviated versions almost anywhere. Suffice it to say: Psyche is a mortal lover of Cupid. His mother Venus despises and punishes her. Fleeing from Venus' persecution, the mortal Psyche prays to two other goddesses for aid.
First, she stumbles upon a rather ramshackle temple to Ceres. The goddess notices Psyche's careful reordering of the temple offerings, and takes pity on her; appearing and inquiring why Psyche does not flee further from Venus for safety but rather tends carefully to Ceres' shrine. Psyche prostrates herself and literally cries upon Ceres' feet, praying for sanctuary:
By your fruitful right hand, by the harvest ceremonies which assure plenty, by the silent mysteries of your baskets and the winged courses of your attendant dragons, by the furrows in your Sicilian soil, by Proserpina's descent to a lightless marriage, and by your daughter's return to rediscovered light, and by all else which the shrine of Attic Eleusis shrouds in silence — I beg you, lend aid to this soul of Psyche which is deserving of pity, and now entreats you. Allow me to lurk hidden here among these heaps of grain if only for a few days, until the great goddess' raging fury softens with the passage of time, or at any rate till my strength, which is now exhausted by protracted toil, is assuaged by a period of rest.*
Ceres is indeed moved by these prayers, and receives them sympathetically. Notice the knowledge of the goddess which Psyche draws upon in her prayer. They at first seem like flattery, but they are also somewhat legalistic. Psyche beseeches Ceres as one who 'assures plenty, who harbors secrets, whose daughter was reunited with something good... thus how can Ceres not assure Psyche plenty, harbor her as a secret, help her reunite with something good?' But this is prayer, not magic — she is begging the goddess, not binding. Is that line blurry? Oh yeah.
And Ceres refuses her, because a thoughtful offering and convincing, heartfelt prayer are no match for Ceres' friendship, familial bond, and respect for Venus. However, she lets Psyche go free; and points out that this itself is risky and generous of her — a small betrayal of her relationship with Venus.
(Psyche at the Shrines of Juno and Ceres by Edward Burne-Jones)
Later, Psyche comes across the (absolutely beautiful) temple of Juno. She embraces the still-warm altar and prays again:
Sister and spouse of mighty Jupiter, whether you reside in your ancient shrine at Samos, which alone can pride itself on your birth, your infant cries, and your nurture; or whether you occupy your blessed abode in lofty Carthage, which worships you as the maiden who tours the sky on a lion's back; or whether you guard the famed walls of the Argives, by the banks of the river-god Inachus, who now hymns you as bride of the Thunderer and as queen of all goddesses; you, whom all the East reveres as the yoking goddess, and whom all the West addresses as Lucina [light-bringing goddess of childbirth], be for me in my most acute misfortunes Juno Sospita [the savior], and free me from looming dangers in my weariness from exhausting toils. I am told that it is your practice to lend unsolicited aid to pregnant women in danger.*
Again, Psyche beseeches Juno as one who is powerful and widely adored — who could oppose her will? — and most importantly, one who saves and whose special care is pregnant women in danger. How then could she forsake the pregnant, imperiled Psyche? Surely she cannot fear Venus, for Juno herself is so powerful... and is even the sister and spouse of Jupiter.
Alas, Juno is also unable to bear the burden of opposing Venus outright, and is bound by other conflicting laws. Prayer alone is not enough to oppose the vengeance of a goddess. And the gods are loyal to one another, and to the order and security of the existing hierarchies and bureaucracies. Mortals do not often carry divine privilege.
While these two prayers are the religious practice I hoped to discuss, it bears mentioning that Psyche's aid comes from high figures (ultimately) and from lower ones. She is granted many favors from less divine beings, in scenes which forcibly conjure folktales of the last hundred years or so. These favors are given in payment for her kindness or beauty, and sometimes her pre-existing relationships. There is both a religious function and a magical technique at play there: do not overlook smaller beings, and act well toward others so that you are not alone in your time of need.
(Jupiter's Eagle Bringing Water of the Styx to Psyche by Léon Davent)
It is only after Psyche has endured many trials and (crucially) ensured the completion of all her divinely assigned tasks that Cupid, who selfishly misses his lover, finally appeals to the kingly Jupiter for Psyche's sake. Cupid's bond with Jupiter is enough to sway him, and Jupiter in turn constrains Venus' ire. He then sends for Psyche and offers her the ambrosial drink which turns her immortal.
Note that one stream of authority is against our protagonist, but her relationship to a different divine power allows for the leveraging of an alternative hierarchy to overrule the opposing one. Look back and see that this is what Psyche was attempting to do in her prayers to Ceres and Juno. They ultimately do not grant her what she wants, but there is an acknowledgement that they could. This is an important mechanic of ancient religion and magic alike.
Allegorically speaking, the joining of desire (Cupid) and the soul (Psyche) — through initiatic perseverance and trials — culminates in apotheosis and divine marriage, as well as resulting in sensual pleasure. But I think there's a much stronger echo of older high-pagan theology present in this late-pagan tale. If the structure of the story is late-pagan Platonic, the wit and cunning within it recalls high-pagan power. I find Psyche's clever prayers a phenomenal example of this.
(Betrothal of Cupid and Psyche by Filippo Pelagio Palagi)
* Even though I read Metamorphoses quite recently, I made liberal use of Theoi.com to refresh my memory while writing this response, and pulled both direct quotes from the translations there.