I think that Lucy Maud Montgomery used the references from a poem "Rubaiyat" by Omar Khayyam, to build a love story between Emily Byrd Starr and Teddy Kent in Emily's Quest, by using the symbolism of a book, a rose and a wine.
"If I had a tail I'd lash it," groaned Ilse, casting herself on Emily's bed and hurling one of Emily's treasured volumes—a little old copy of the Rubaiyat Teddy had given her in high school days—across the room. The back came off and the leaves flew every which way for a Sunday. Emily was annoyed." (Emily's Quest).
First of all, we learn that it was Teddy who had given Emily this book, during their childhood. By saying so, Montgomery might imply that he understood (and perhaps, shared) Emily's love of poetry and beauty. While Perry Miller gives Emily more practical gifts (a hen, a typing machine), Teddy gives her "an old copy" of a poem - a gift Emily loves, even if others might not find it it worth-while. The gift is a symbol of their mutual understanding and similar approach to life.
It is important to point out that Emily cherished this book, partly because it was a gift from Teddy. Their friendship was strong at this point, slowly starting to blossom into something more.
Another moment in their relationship is symbolized by Ilse destroying the book. An act of throwing it across the room might refer to the way Ilse was casually throwing comments about Teddy, and in doing so, she shatted Emily's perfect image of Teddy. Perhaps the ruined book is a symbol of Teddy and Emily's failing relationship.
The quote "The back came off and the leaves flew every which way" might be a reference to noticing the side of Teddy Emily was not aware of.
On the day of her twenty-fourth birthday, Emily opens the letter to herself, written at the age of fourteen and finds old rose petals inside the envelope (another gift from Teddy):
"A whiff of old fragrance came with it. Folded in it were some dried rose-leaves—crisp brown things that crumbled to dust under her touch. Yes, she remembered that rose—Teddy had brought it to her one evening when they had been children together and he had been so proud of that first red rose that bloomed on a little house rose-bush." (Emily's Quest).
It might be read as a reference to these verses: "Each Morn a thousand Roses brings, you say: Yes, but where leaves the Rose of Yesterday?"
"Rose of Yesterday" might symbolize a love that once was, especially in connection with these verses from "Rubaiyat": "One thing is certain, and the Rest is Lies; The Flower that once has blown for ever dies."
Similarly, the quote from Rubaiyat: "And look—a thousand Blossoms with the Day
Woke/and a thousand scatter'd into Clay/
And this first Summer Month that brings the Rose/ Shall take Jamshyd and Kaikobad away."
might refer to Emily and Teddy's happy summer, after she broke her engagement with Dean:
"A wonderful month followed. A month of indescribable roses, exquisite hazes, silver perfection of moonlight, unforgettable amethystine dusks, march of rains, bugle-call of winds, blossoms of purple and star-dust, mystery, music, magic. A month of laughter and dance and joy, of enchantment infinite. Yet a month of restrained, hidden realization." (Emily's Quest).
Just like in the poem, after the happy month has passed, Emily and Teddy's relationship is strained again, after he leaves (seemingly) with no goodbye.
When Emily finds out about Ilse and Teddy's engagement, she says: "I've spilled my cup of life's wine on the ground—somehow. And she will give me no more. So I must go thirsty. (Emily's Quest)
It is, possibly, a reference to these verses of Rubayiat:
"Dreaming when Dawn's Left Hand was in the Sky I heard a Voice within the Tavern cry, "Awake, my Little ones, and fill the Cup Before Life's Liquor in its Cup be dry." (Rubaiyat).
"Wine" might refer to the joys of life and the contentment of the present time. It is Dean Priest who uses a "wine" as a symbol of life and happiness: "Emily, do you know I'm a little drunk to-night—on the wine of life. Don't wonder if I say crazy things." (Emily's Quest).
Similar meaning is to be found in the Rubaiyat: "Ah, fill the Cup:—what boots it to repeat How Time is slipping underneath our Feet: Unborn TO-MORROW and dead YESTERDAY, Why fret about them if TO-DAY be sweet!"
For Emily, at this point, her own "today" is unbereable. After learning about Ilse's plans to marry Teddy, Emily "did not feel either pain or surprise—one does not feel either, I am told, when a bullet strikes the heart." and "it seemed to her that she was suffering everything of death but its merciful dying" (Emily's Quest).
The message of Rubaiyat is a devastating one:
"Then to this earthen Bowl did I adjourn My Lip the secret Well of Life to learn: And Lip to Lip it murmur'd—"While you live, Drink!—for once dead you never shall return."
By saying "So I must go thirsty" Emily might mean that - without the wine - her own life is going to be empty of all the hopes and dreams - that there is no return to who she used to be. Her biggest regret, though, is not the fact Teddy doesn't love her at this moment, but the fact he seemingly never had. When she learns about his letter, she feels like a changed person:
"Bitterness—humiliation—shame had vanished from her being. Teddy had loved her. The sweetness of the revelation blotted out, for the time at least, all other feelings. Anger—resentment—could find no place in her soul. She felt like a new creature." (Emily's Quest).
The references from the poem are seen through the last book. The poem Teddy had given Emily, seemingly shaped their entire journey together.