If it were my ms., I'd keep it in stanzas as much as possible. That's what editors expect to see. Above all you don't want to come across as an amateur.
I'm not sure there are any rules to cover your particular situation. In fact, I'm not sure I understand the question. But, if I interpret you right, here's how I'd do it:
Note to editor: The character speaking is designated within parens. and should not be considered part of the text.
(John speaks:)
I knew the rule that, when at school
And gazing at a map,
It wasn’t wise to shut your eyes
And take a little nap.
(Mary speaks:)
I dreamt I saw the seven seas,
I wanted to explore.
I went by train, by boat, by plane
And gazed on every shore.
(John speaks:)
I took a bus to Marrakesh,
A taxi to Peru.
(Mary speaks:)
I rode a mule to Istanbul
A yak to Timbuktu.
Does this solve the problem? Editors know that not every manuscript can be formatted according to the rules. So just make it as clear as you can, and if there are any remaining problems, mention them in the cover letter.