I will not implement this in the code: too specific, and would (slightly) slow down things at rendering time, i.e. it would only add code bloat for a feature almost nobody would use.
But you may perfectly implement it yourself with a few lines of Lua, thanks to the
Cool VL Viewer Lua scripting feature (I implemented Lua scripting in the Cool VL Viewer exactly for this kind of purpose). Look for the IsAgentFriend() and DerenderObject() functions as well as the OnAvatarRezzing() callback...