Nothing illegal per se, but I would be shocked to hear that the ride along policy allowed it. Also, if you were required to enter the police station that would be an issue.
Many years ago I requested a ride along with the Madison PD. They never got back to me. So I mentioned to them that I was "on the list" for ride along for way too long and they said they'd look into it. Then they still never got back to me. So I gave up. This was all prior to becoming more "well known" in the community. At that time I would have just requested use of the Remington shotgun in the unlikely event things got ugly, but now only Madison SWAT uses shotguns, so it would be an AR-15.