In my experience Abdopus aculeatus isn't much of a threat to fish or even ornamental shrimp and crabs. Given it's fed well and isn't housed with any fish that will pick on it, I don't see any problem. You would need to pay close attention to your water parameters though.
O. mercatoris would probably be best housed with others of the same species. They do appear to be sociable or will at least tolerate the presence of their own species, and they are suitable for captive breeding. That would require a tank with no fish though.
I wouldn't suggest keeping an octopus in a reef with frags. If the pieces are whole colonies and are attached to a heavy rock, they will be fine. Otherwise the octopus can and will move any rocks and corals small enough when it decides to build a den. You would be amazed how much weight they can move around when they want to.