Hello Jean Heloise - welcome to the forum.
Yours is an odd sentence, I agree.
And I do not think that it is "right", as you say.
"Before sending their lanterns into the sky, they wrote wishes on them" is a much better sentence.
Just because something is written does not make it correct.
- For Teachers