Certified GKH Gardening Expert
WOW That is cool!!! If another cactus was nearby, then this is likely the case: The other cactus has grafted itself to your plant!
Usually, this is done, by hand, and purposely. I don't think that this is the case, here. You can remove it and grow it as its own cactus, or you can leave it as a strange novelty.