A number of philosophers and mathematicians do see a deep connection between poetry and mathematics. Betrand Russell put it thus:
Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture, without appeal to any part of our weaker nature, without the gorgeous trappings of painting or music, yet sublimely pure, and capable of a stern perfection such as only the greatest art can show. The true spirit of delight, the exaltation, the sense of being more than Man, which is the touchstone of the highest excellence, is to be found in mathematics as surely as poetry.
Franz Kafka says that "poetry is always a search for truth". Likewise, mathematics can be described as searching for truth, albeit with numbers. The same beauty and elegance one strives for in mathematics is no different to that which a poet seeks with words.
To answer your question about whether poetry would be constricted by the rigid rules of mathematics, it's worth keeping in mind that a lot of poetry is about rules and rigidity: meter, rhyme, form. Poetry strives for the same level of truth in beautiful, elegant, simple and minimal ways, very much like mathematics. It may seem counter-intuitive, but such rigidity in poetry frees oneself to be creative, forcing you to choose your words carefully, to say what you mean in the best, most succinct way possible.
For a deeper look at the connection, I recommend the book "Mathematics, poetry and beauty" by Ron Aharoni, which attempts to connect the two domains. It notes that "poets, like mathematicians, are hunters, engaged in the search for hidden patterns in the world". Despite poetry being "invented", there are underlying truths that exist:
A metaphor that is on target reveals a similarity that is concealed, but that is out there. After all, "on target" implies that the target was already present. When the poet Yehuda Amichai writes:
Careful angels passed fate within fate,
Their hands shook not, nothing dropped or fell.
(Yehuda Amichai, "Twenty New Squares," Poems)
he expresses an existing truth: our fate is no more in our hands than the thread is master of its fate; there are forces that direct it, as the seamstress directs the thread. This is beautiful, not because it is an invention, but, mainly, because it is true.