Both the borders with Argentina and Paraguay are very easy to pass without getting entry/exit stamp, as you have realized – almost everyone passing is either a tourist visiting the waterfalls for a day or citizens of Mercosur which don’t need passports to cross.
It’s not a big issue and the simplest course of action is what you mentioned:
If you prefer you may also go to Policia Federal in Foz do Iguaçu and try to explain yourself, but for the love of God don’t try to fly inside / out of Brazil without the stamp, as you’d have some consequences for sure – I’m here 100% legally registered and still have some issues with PF every few weeks.
Credit:stackoverflow.com‘