I have a car seat that was loaned to a family member and returned with the internal styrofoam structure (under the fabric) broken on one side (see picture)
Is the seat safe to use or do I need to get a new one?
No. I would not risk it. Usually the manual will say not to use the unit if it's damaged, or even to use it if it's older than a few years. Parts may look just little bit damaged, but that little bit can cause a failure during an accident that will leave your little one hurt. Of course, like everything else, there's a tradeoff between cost (in this case free) and safety, but I personally would never use a damaged safety seat. Save money elsewhere, like by buying less plastic toys they get tired of after a day. :-)
This seat should not be used - Period.
Car seats are designed to do two things, restrain the occupant by not deforming and absorb/transfer energy by deforming in a controlled way.
This seat is structurally compromised and will not perform correctly under load. The area below the break will not deform correctly and will absorb less energy than designed (the remainder transferred to the occupant) and the area above the break will perform no function at all.
It may have already been compromised and that's how it got broken but there is no way to know that for sure.