Legge ends his note by saying the Taoism here "can hardly be distinguished from the Buddhism" that calls experience illusion. The sentence he translates says the opposite: "between Kâu and a butterfly there must be a difference." The dream does not dissolve the two into appearance; it shows them passing into each other while remaining distinct, and the story names that passage "the Transformation of Things." The comparison flattens the one point the story insists on.
The Tâo Teh King — Sacred Books of China Part I, SBE Vol. 39 (trans. James Legge, 1891)
No image is selected for this page; its own page image is shown.

‘Formerly, 1, Kwang Kâu, dreamt that I was a butterfly, a butterfly flying about, feeling that it was enjoying itself. I did not know that it was Kâu. Suddenly I woke, and was myself again, the veritable Kâu. I did not know whether it had formerly been Kâu dreaming that he was a butterfly, or whether it was now a butterfly dreaming that it was Kâu. But between Kâu and a butterfly there must be a difference*. This is a case of what is called the Transformation of Things*.’
1 The mind cannot rest in second causes, and the first cause, if there is one, is inscrutable.
2 Even these must wait for the will of the creature; but the case of the shadow is still more remarkable.
3 I have put this as a question, as being more graphic, and because of the particle 耶, which is generally, though not necessarily, interrogative.
* Hsüan Ying, in his remarks on these two sentences, brings out the force of the story very successfully:—‘Looking at them in their ordinary appearance, there was necessarily a difference between them, but in the delusion of the dream each of them appeared to be the other, and they could not distinguish themselves! Kâu could be a butterfly, and the butterfly could be Kâu;—we may see that in the world all traces of that and this may pass away, as they come under the influence of transformations. For the phrase ‘the transformation of things,’ see Book XI, par. 5, et al. But the Taoism here can hardly be distinguished from the Buddhism which holds that all human experience is merely so much mâyâ or illusion.