Best practices are to separate the role of network firewall from everything else. Generally.
The reasoning behind this is that the more software you have running alongside your firewall, the greater the risk of it becoming compromised through a bug in other software -- and if someone compromises your firewall, they effectively own your network (or at least the partition thereof "guarded" by that firewall).
However, typically this is easily mitigated by simply denying access from the outside world, as that's where most attempted attacks typically originate. Since there's no need for "outsiders" to be using your proxy (and plenty of reason for you to want to deny them that anyway), then you can easily just configure your firewall to drop/reject such connections coming from outside your network. (For my part, even though I use SSH to manage my Linux-based firewall and allow SSH into my network from outside, outside SSH connections actually get port forwarded to a separate server inside my network, from which I can hop to the firewall if I need to, rather than accepting them directly at the firewall. Simply because it reduces the attack surface on my firewall itself.)
This does still leave your firewall exposed to being compromised by way of a vulnerability in Squid from a malicious user inside your network. Whether this risk is serious enough to warrant the effort of installing Squid on a completely separate box (it is doable even for a transparent proxy configuration as you're asking for, but does add complexity) or not is a trade-off you have to consider for yourself -- if this is just a home network, probably not worth the hassle, but if this is the internet gateway for a large school district or an ISP, then you must very seriously consider the risk of attack from within.
As with all security issues, it's a matter of trade-offs. If in doubt, however, my recommendation is to follow the best practices here and put that proxy on a separate box -- better safe than sorry, especially when talking about your firewall!