Hindu sources are a pain to check (at least for a non-Sanskrit speaker). I will give details about the story and discuss the source below it.
Tales
The tale concerns a sage Narada looking forward to understand the concept of the maya.
Story A: The earliest story (I could found) is told inside a story by Vyasa. Prince Kamadamana is talking with his father, his father wants him to marry. Kamadamana says that in his last incarnation he discussed with the god Vishnu, who told him that the sage Narada asked the God to explain the maya. Vishnu led Narada into a pond, in the pond Narada emerged as princess Sushila (daughter of king Benares). Sushila married a prince, and had many children and grandchildren. Sushila was happy, but at the end of her life a war broke out between her husband and her father. All of her family died in the war so she threw herself into a pyre. But when touching the fire, she remerged out of the pond as Narada.
Story B: However the story you probably got is another one about fetching water. This version is a simplification of the early story and does not concern Kamadamana. The story goes like this:
The hero in this case was again Narada, the model devotee. Through prolonged austerities and devotional practices, he had won the grace of Vishnu. The god had appeared before the saint in his hermitage and granted him the fulfilment of a wish.
Show me the magic power of your Maya.
Narada had prayed, and the god had replied
I will. Come with me.
but again with that ambiguous smile on his beautifully curved lips.
From the pleasant shadow of the sheltering hermit grove, Vishnu conducted Narada across a bare stretch of land which blazed like metal under the merciless glow of a scorching sun. The two were soon very thirsty. At some distance, in the glaring light, they perceived the thatched roofs of a tiny hamlet. Vishnu asked:
Will you go over there and fetch me some water?
Certainly, O Lord.
the saint replied, and he made oft to the distant group of huts. The god relaxed under the shadow of a cliff, to await his return.
When Narada reached the hamlet, he knocked at the first door. A beautifuf maiden opened to him and the holy man experienced something of which he had never up to that time dreamed: the enchantment of her eyes. They resembled those of his divine Lord and friend. He stood and gazed. He simply foigot what he had come for. The girl, gentle and candid, bade him welcome. Her voice was a golden noose about his neck. As though moving in a vision, he entered the door.
The occupants of the house were full of respect for him, yet not the least bit shy. He was honorably received, as a holy man, yet somehow not as a stranger; rather, as an old and venerable acquaintance who had been a long time away. Narada remained with them impressed by their cheerful and noble bearing, and feeling entirely at home. Nobody asked him what he had come for; he seemed to have belonged to the family from time immemorial. And after a certain period, he asked the father for permission to marry the girl, which was no more than everyone in the house had been expecting. He became a member of the family and shared with them the age-old burdens and simple delights of a peasant household.
Twelve years passed; he had three children. When his father-in-law died he became head of the household, inheriting the estate and managing it, tending the cattle and cultivating the fields. The twelfth year, the rainy season was extraordinarily violent: the streams swelled, torrents poured down the hills, and the little village was inundated by a sudden flood. In the night, the straw huts and cattle were carried away and everybody fled.
With one hand supporting his wife, with the other leading two of his children, and bearing the smallest on his shoulder, Narada set forth hastily. Forging ahead through the pitch darkness and lashed by the rain, he waded through slippery mud, staggered through whirling waters. The burden was more than he could manage with the current heavily dragging at his legs. Once, when he stumbled, the child slipped from his shoulder and disappeared in the roaring night. With a desperate cry, Narada let go the older children to catch at the smallest, but was too late. Meanwhile the flood swiftly carried off the other two, and even before he could realize the disaster, ripped from his side his wife, swept his own feet from under him and flung him headlong in the torrent like a log. Unconscious, Narada was stranded eventually on a little cliff. When he returned to consciousness, he opened his eyes upon a vast sheet of muddy water. He could only weep.
Child!
He heard a familiar voice, which nearly stopped his heart.
Where is the water you went to fetch for me? I have been waiting more than half an hour.
Narada turned around. Instead of water he beheld the brilliant desert in the midday sun. He found the god standing at his shoulder. The cruel curves of the fascinating mouth, still smiling, parted with the gentle question:
Do you comprehend now the secret of my Maya?
Sources
As said this stories are a pain to look because there are no good archives in English, there are too many mystycism/modern yoga/self-help books retelling these stories, and certainly there are famous tales that are not in the usual sacred texts (Puranas and so on).
The academic sources (I could found) that discuss this story in English, point to the translation by Heinrich Zimmer's Myths And Symbols In Indian Art And Civilization (1946). According to Zimmer, story A above is from the Matsya Purana (one of the 18 major Puranas). However the story B water is described by Zimmer as a famous nursery tale originated in the 19th century. His version of story B, quoted above, is from a Bengal priest Ramakrishna, more specifically
The Sayings of Sri Ramakrishna (Mylapore, Madras, 1938), Book IV, Chapter 22.
With all that said this as far as I can verify. I know that others in Hinduism SE have tried to verify this without reaching a conclusion, see: What scriptures describe Krishna teaching Narada about Maya?
The tale has undoubtedly changed with time and you can find many versions of it on the internet where Vishnu is replaced by Krishna. By looking into Google Books I found one version of Krishna's version in a dubious translation of the Naradiya Purana, but it was not reliable. Other websites cite another 19th century Bengal monk Swami Vivekadana for the Krishna version of the tale.
Zimmer is mostly reliable, you can easily find a version of his book in the Internet Archive.
The jug
You mentioned a jug. Zimmer adds this just after story B to explain its significance:
From the period of the early Vedas down to the Hinduism of the present, water has been regarded in India as a tangible manifestation of the divine essence.
In the beginning, everything was like a sea without a light
declares an ancient hymn; and to this day, one of the most common and simple objects of worship in the daily ritual is a jar or pitcher filled with water, representing the presence of the divinity and serving in the place of a sacred image.