Can you quote a poem in the explanatory text?

Of course.

Explanatory texts can quote poems. Quoting poems can increase the literary color and expressive force of expository writing, and help convey the feelings or meanings that the author wants to express. Poetry can be used to attract readers' attention or highlight themes.