We theoretically investigate two quantum modes interacting via local couplings to a dissipative field. Our model considers two mechanical modes with distinct frequencies coupled optomechanically to the same cavity mode. The dissipative cavity field mediates the interaction between the mechanical modes but also leads to decoherence of the mechanical oscillators. Depending on the ratio between effective interaction strength and dissipation rate, which can be chosen via the pump detuning, the interaction assumes a quantum mechanical or classical character. For any cavity decay, there is a regime where the two mechanical modes interact in a non-classical way, which leads us to conclude that optomechanical systems can serve as a model to experimentally study the effects of long-range interactions mediated by classical or quantum-mechanical fields.