Unfortunately, Brazil has a problem with many stray animals. It is likely you will see stray dogs and cats scrounging for food, or lounging in the shade during the heat of the day. Like in Canada, you should not feed these animals. You don’t know where they have been, you don’t know if they might bite, or if they have diseases.
It is an unfortunate situation to be sure, but the animals are actually fairly well socialized. Generally speaking while dogs might look at you to see if you will feed them, they largely don’t get too close. They are equally wary of humans (probably a lot have been abused). Lots of people do throw scraps and other food to the animals, so don’t be fearful that they won’t be eating.
I find cats are actually more willing to come to the table and beg for food directly. At one restaurant, I was sitting outside (as I usually do in Brazil) and I repeatedly had to shoo away a cat who wanted to jump up on my lap and share my dinner. It broke my heart to say no, but I didn’t know if the cat was healthy. I did realize the reason the cat was so intrusive, the owner of the restaurant regularly fed this cat. He even let it into his house (attached to the restaurant), although very obviously had taken measures to prevent it entering into his kitchen.
It is very hard to see these animals and not want to take them home with you. But, it definitely reinforced the importance of Bob Barker’s classic sign-offs, “don’t forget to spay and neuter your pets”.
Don’t think for a second that Brazilians don’t like animals though. Lots of people do have dogs and cats as pets though. And just like anywhere else these pet owners clearly spoil their pets. I do wonder how the animals stay cool enough with their thick coats of fur, but anytime of day you’ll see lots of pets taking a walk with their humans, exploring every interesting smell along the way, happy as can be.