$ echo 'hello' >name
 
 $ ln name othername
 
 $ ls -l
total 4
-rw-r--r--  2 kk  wheel  6 Jun 25 09:45 name
-rw-r--r--  2 kk  wheel  6 Jun 25 09:45 othername
 
 $ cat othername
hello
 
 $ rm name
 
 $ ls -l
total 2
-rw-r--r--  1 kk  wheel  6 Jun 25 09:45 othername
 
 $ cat othername
hello
 You're doing something seriously wrong if, by removing one hard link, you also remove the other. Using rm or rm -rf in this case does not matter, nor does it matter which name is removed.
 Removing a hard link just removes one of the names of the file. The only way I can see that rm -rf could remove both names is if you used it with a filename glob that matched both names, or if you deleted the directory that contained them both.
It appears, from comments, that you are actually using an application that creates a hard link for a directory. This is possible on macOS HFS+ filesystems under certain conditions. It is generally really fiddly to work with hard linked directories, and their use is largely limited to things like Apple's own TimeMachine software.
Related Stackoverflow question: What is the Unix command to create a hardlink to a directory in OS X?
 It is pointed out in amongst the answers to that question, that a hard linked directory needs to be deleted using unlink rather than rm -r since rm -r would delete the directory's contents (under all its names).
See also: Forcibly create directory hard link(s)?
 
                