I know nothing of ports in Brazil, but an aquaintance sailed into a SE Asian port which was supposedly lax on visas. He was met by officials and treated much as he would have been if he had arrived at an airport without an entry visa. This port was on a small island, north of Darwin. Many sailors in the region claimed to have made the same, under-the-radar visit during a long weekend's sail.
He was fined a relatively small amount of money (rupiah vs $) and was bundled onto an aircraft, flown to Jakarta, then deported. He arranged for a third person to return his boat to Australia some many weeks later. He claimed 'things' had been removed from his boat, but this was never confirmed and the insurance company told him to p***off. The boat was not allowed to leave the port until his deportation fees (airfares and two night's 'accommodation' costs) had been reimbursed to the authorities. I am also led to understand that if he had not reimbursed the authorities, his boat would have been declared as an import. and duties and taxes would have been considerable.
I feel it would be judicious to follow the rules. You might be able to sail in without trouble; then again, you might be in the poop. Either way, make sure you have a nice neat courtesy flag and make a decision as to whether you will give the port advance warning, or just sail in.
A final word: Most countries will give a sailor sanctuary when there are perilous conditions at sea, and when his or her boat suffers a serious breakdown...or if, say after a very tough voyage, a skipper determines there is no close, safe anchorage, and that he feels he would imperil his boat and crew if he continued. However, in many cases, authorities will confine crew to their boat until the weather breaks, a repair is effected, and the crew is rested.
Of course, if you manage to sail in without trouble (sans visa), you will need eventually to sail out. Exit clearance could be a different matter and officials would have you over a barrel
It's all an adventure.
"if at first you don't succeed....Redefine success"!