The gyroscope does not have to be at the COG of the robot, but it is helpful if it is somewhere near the COG.
How you do this depends greatly on your drive system. The two most likely drive chassis to use "strafing" are mecanum and h-drive. I do not have any experience with lobster, crab, or swerve.
Mecanum: The easiest way to do this is to use the Holonomic Drive class, in "field coordinates". We got one of these working in December using the cRIO, and the code is posted at
https://github.com/frc3946/MecanumDrivetrain.
H-drive: While strafing, use the "tank drive" wheels to maintain your bearing (that is, azimuth) while you strafe. This can be done using a PID, or probably just with a very simple "P" loop - if you're too far left, rotate a bit to the right, if you're too far left rotate a bit to the left. The amount of rotation would be proportional (that's the P) to the error in your current bearing. If the proportionality constant is too large, you'll oscillate around the correct angle; if too low, you'll keep drifting away. We're using H-drive this year, but haven't written this yet - we have an adjustable strafe wheel mount, so we are hoping that we don't rotate very much. In any case, our rotation will be controlled primarily by a pair of range finders rather than the gyro.