Is it correct to say that the bright moon is barking in the sky and the yellow dog is lying on the flower core?

That's right. This poem comes from a story:

Su Dongpo changed the poem

One day, Su Dongpo went to visit his senior Wang Anshi. When he arrived at his residence, he saw that there was no one in the courtyard, so he simply waited in the study. In his spare time, Su Dongpo saw a poem with wet ink on his desk, "Barking in front of the bright moon window, and the yellow dog lying in the flower core." After reading, Su Dongpo shook his head and thought, how could the talented Wang Anshi write such a discrepancy? Actual verses. So I changed my pen to "The bright moon shines in front of the window, and the yellow dog lies in the shade of the flowers." I changed the last word of the two sentences of the original poem from "call" to "photo", and "core" to "shade". I was enjoying the changes alone. When Wang Anshi came out of the inner room and saw that his poem had been revised, he was immediately unhappy, but without changing his expression, he chatted with Su Dongpo about other topics.

A few days later, a transfer order was issued and Su Dongpo was demoted to Hepu, the remote state capital. On the way to his post, Su Dongpo had to take a boat down the river. When the boat reached the middle of the river, Su Dongpo, who was originally depressed, was attacked by a group of people flying and shouting. Su Dongpo felt that this bird he had never seen before seemed to be against him, and he would not chase it away, so he curiously asked the boatman what kind of bird it was. "This is the famous Bright Moon Bird."

When he took office, one day, Dongpo paid a private visit incognito and came to the countryside. At this time, it was March in spring, and the mountain flowers were blooming, but he saw a small bird. Unseen small things sometimes danced among the flowers, and sometimes penetrated the flower cores to collect pollen. Their shapes seemed to be sleeping in the flower cores. Dongpo felt curious, stopped and leaned over to watch, and asked the villagers. When the villagers told When he realized that this was not a bee but a "yellow dog", Su Dongpo suddenly felt that he was ignorant and self-righteous in the past.