I think relocatable code predates Virtual Memory (VM). The alternative is absolute code, which has to be loaded at a specific location in physical memory (e.g. because it contains "Jump" instructions that have physical addresses as destinations)
The 8086 was backwards compatible with older processors which could only address 64KB of memory using 16-bit address registers. The 8086 also had 16-bit segment registers which were taken into account (e.g. when performing a jump instruction) basically the real address = address + segment<<4. This allowed (relocatable) programs to be located anywhere in 1MB memory aligned to 16 Byte "paragraph" boundaries (the 4-bit shift in the calculation above). Such programs can only address 64KB. Obviously the OS changes the segment register appropriately on a context-switch.
It seems clear that if your program manipulated the segment registers, perhaps so it could use more than 64 KB memory, it could not be relocated in this way.
Intel 8086/8088 program are sometimes relocatable or, more precisely, position independent, if they do not attempt to manipulate the segment registers. In this case, the OS can load the program anywhere in available memory on a 16 byte boundary, set the segment registers accordingly, and the program will run correctly. In this mode, however, the program only has access to four 64KB segments of memory.
It is also possible to be position independent and have access to more memory of the program takes the approach of biasing all segment manipulations to the initial values present at program startup.
Note that this discussion does not take into account the possibility that the load module format is, in itself, relocatable, requiring relocation by the loader. That is a third possibility.
The 8086 object module formats permit specification of
relocatable memory imaqes that may be linked to one another.
Capabilities are provided that allow efficient use of the memory
mapping facilities of the 8086 microprocessor.
8086 RELOCATABLE OBJECT MODULE FORMATS
An Intel Technical Specification