This is a genuine quote from the Buddhist scriptures. It’s from the Sutta Nipata.
“See them, floundering in their sense of mine, like fish in the puddles of a dried-up stream — and, seeing this, live with no mine, not forming attachment to experiences.”
“Live with no sense of ‘mine,’ not forming attachment to experiences.” The Buddha
This is a saying from the Pali canon, upadhi dukkhassa mūlanti, which means “Attachment is the root of suffering.” So this is a genuine canonical quote.
You’ll find it in this sutta, but translated by Thanissaro as “Acquisition is the root of stress.” His translations are rather idiosyncratic.
In this translation of the same sutta it’s “acquisition is the root of suffering.”
Bhikkhu Bodhi’s translation (not available online, but in The Middle Length Discourses of the Buddha, page 868) has “attachment is the root of suffering,” although he sometimes has “acquisition” in place of “attachment,” in various repetitions of the phrase.
This striking verse is found in the Magandiya Suta in the Sutta Nipata, which is generally held to be one of the oldest texts in the Pali canon.
Bhikkhu Thanissaro translates this as:
“Those who grasp at perceptions and views
go about butting their heads in the world.”
Fausböll, a 19th century pioneer translator, has:
“But those who grasped after marks and philosophical views, they wander about in the world annoying people.”
“Those attached to the notion ‘I am’ and to views
Roam the world offending people.”
The translator notes that “I am” is not in the quotation, but that its inclusion is warranted by material nearby.
The original Pali is:
Saññaca diṭṭhiñca ye aggahesuṃ
Te ghaṭṭayantā vicaranti loketi.
My rendition would be:
Those who cling to perceptions (saññā) and views (diṭṭhi)
Wander (vicarati) the world offending (ghaṭṭeti) people.
[Added later: Bhikkhu Varado’s translation, which I just discovered, is almost identical to mine: “Those attached to perception and views / roam the world offending people.”]