Touchy situation. Since you don't provide details like "this guy and I go shooting all the time" or "well, I've never gone with him before and just kind of invited myself along", it's hard to say.
Range time for me is so little and far in between visits at times, if I have a buddy that I don't get to see very often who proposes a range day, I look on it as much as a time to catch up with an old friend as much as a shooting opportunity and to tell the truth, am not unhappy if we have the place all to ourselves with no tag-a-longs. Then at times, going as a 'group' lends itself to an enjoyable day.
Like I said, depends on how familiar you are with your 'buddy' at work. Unintentionally folks sometimes assume too much, though I would not myself make a big deal out of broadcasting around the office I was heading to the range if I didn't care for company tagging along.
In these situations there usually isn't something "wrong" with somebody, but assuming you're welcome to go by inviting yourself to lunch, to the range, to a wedding, or a party is a sure way to set yourself up for hurt feelings. Looking back, I know I have encountered a lot of otherwise nice people that just pushed too hard or tried too hard and I tended to back away from them. As awkward as it would have been to say "gee, that sounds like fun, I'd sure like to make a trip to the range" and then not be invited, it's more awkward now since you admitted your feelings are hurt and that is something you and your work buddy have to deal with if you are to stay on good terms.
To paraphrase something read long ago, 'what we would give to see ourselves as others see us.'