Sure. Buying one isn't a problem... and they're usually not terribly expensive. Year ago, I used to see blue rings in the pet stores once in a while... for like $40. Just what you need, a pet that (A) isn't going to live long in captivity, and (B) might well take you to the grave with it. No, thanks
In a reef tank? Not so much. They'll eat about anything that moves, and they're _very_ good at it. Eat lots, grow fast... crabs, other mobile inverts, and any fish he can catch will be lunch. Depending on his size, that's probably _all_ of your fish

They don't like light... most are nocturnal, and most like colder water than where we normally keep our reefs. Really need a species specific tank for such a critter.
Live fast and die is the octopus motto. Under ideal conditions, most octopus only live 18 months or so. Some, less than that. A few of the big cold water species a bit longer.
And no, I've never kept one. Wanted to at one point, did lots of research into keeping one, and then decided against it. Exceedingly cool creatures, but IMHO, they're better off left in the oceans.
Now... cuttlefish, on the other hand... if there were a good, reliable source for Sepia officinalis in the USA, I'd have tried keeping them at some point. Used to know a couple people in the UK that had them. Neat critters