Sure, but it's the standard way to use install_name_tool on macOS to do precisely what you described. The original commenter apparently is not aware of this.
Since nix stores everything at /nix/store, I didn't want to mess with relative paths...
But yeah, macOS apps can ship their own version of libraries thanks to this flexibility.