Earlier quoted context omitted.
SpaceX is already docking with the space station which is similar difficulty as launching from the moon and docking in lunar orbit. The problem is getting a rocket with enough fuel on the surface of the moon without damaging it, not the docking in orbit. Which is even easier than doing the same thing from the surface of Mars. The only advantage of Mars is you don't need to burn fuel slowing down but that's more than…
I don't think either of us know much about this, but I do know that docking with the ISS to unload supplies requires completely different equipment than doing a rendezvous between a lunar lander and a lunar orbiter for Earth return. (That's why I didn't say merely "docking".) The only craft SpaceX has that can land on Earth or the Moon is Dragon. I am pretty sure Dragon does not have enough delta-v to do a full propu…
The information I'm finding on the internet suggests Dragon 2 should run around 400 m/s of delta-V (it only needs on the order of 200 m/s to go from terminal velocity aerobraking to landed on Earth).
TLI to LLO is 800 m/s, and I'd guess that a Circumlunar return trajectory to LLO transfer would be on that order -- which is already out of the Dragon 2's range and you're only trying to get into orbit on the Moon, not return, and definitely not land or take off again.
Its close enough though that a beefed up Dragon 3 might be able to dock with some kind of space station and refueling dock in lunar orbit, then you just need to have a lunar ferry (Apollo sorta downsized all of this and crammed it all on top of a Saturn V for one-time use -- I'm thinking a bit bigger for the whole system and more cough reusable...)