No, the DOCSIS system is a very asymmetric design at both the physical and data-link layers. A DOCSIS Cable Modem (CM) is only capable of talking to a Cable Modem Termination System (CMTS), and there's no way to turn a CM into a CMTS.
A DOCSIS system's channel frequencies are split at around 50-200MHz; upstream (from CM to CMTS) is below that split, and downstream (from CMTS to CM) is above that split. So a CM's transmitter hardware can only transmit at those lower frequencies, and its receiver hardware can only receive at those higher frequencies. So you can't make two CM's talk to each other because neither will have a transmitter that can transmit at a frequency that the other has a receiver capable of receiving.
Even if the frequency ranges of transmitting and receiving hardware wasn't a problem, there would be protocol problems. The CMTS has a much more complex role in establishing initial communication, such as transmitting information about which channels are available as upstream and downstream channels. Your CMs don't contain any software for performing the CMTS's unique role in those initial negotiations.
Now, if you happened to have two old DOCSIS gateways that had built-in MoCA functionality (which was rare but not unheard of), you could conceivably use them just for their MoCA capabilities without using their DOCSIS capabilities, assuming they don't get too grumpy about their DOCSIS interface never being able to establish a connection. If you are still on a DOCSIS ISP, you might need to install some high-pass filters (ones that deeply attenuate all frequencies below about 1GHz but allow all higher frequencies to pass through unhindered) in front of such devices so that they aren't able to keep pestering your ISP's CMTS on DOCSIS/CATV frequencies, as I've never seen a DOCSIS device that allows you to turn its DOCSIS interface completely off.