Most people don't keep them in the same tank because they could both pose a threat to the other, so I only know of a few people who have tried keeping octopus with nems, but, from what I've read, if the nem has a mild sting (for an octopus, not necessarily a human), it can technically be kept with the octopus. That said, the stings from many nems (even some mild nems) can damage the octopus' skin and lead to blisters, scarring, infections, etc.
Anecdotally, I have heard of success with bubble tip anemones and an octopus, but that's about it (and I don't have a lot of info on that setup - the octopus may still have been stung on occasion). The only other nems I've heard of people keeping with their octopus have caused serious problems and greatly shortened the lifespans of the octopuses kept.