You are thinking about a story referenced in the _Húsdrápa_ , which Snorri excerpted in his _Edda_. It plays out more or less as you described, except Heimdall does not catch Loki in the act, but is asked by Freya to retrieve Brisingamen. The only detail to add was that evidently Heimdall and Loki fought as seals. That is really all we know about it.
Further than this, as have already been noted, Loki and Heimdall will fight and kill eachother at Ragnarök. They also interact in the _Lokasenna_ , a poem where Loki shows up at a party and insults the other gods. Heimdall does not seem to be under more fire than his fellow gods.