I guess it wouldn't be hard to carefully unwrap it and then put the soaped ice cream back in the wrapper. I don't think an office food thief will be too observant.
Do be careful. In the US (and I'd imagine must of Europe, but don't know) it is illegal to boobytrap. Which (again US) has been upheld up include putting knowing harmful ingredients in food you expected to get stolen. Spicy food you intend to eat yourself is fine, but spicy food you don't intend to eat yourself may go over the line.
For someone to actually be harmed from biting into soap, they'd have to actually swallow it. I'd think nobody in their right mind would actually swallow soap, unless by chance they don't have a sense of taste and smell.
My coworker and I made our own Sriracha and kept a bottle in the work fridge. It was labeled and dated. The lunchroom thief was raiding our Sriracha, which was no big deal in and of itself. The dick move was that this person would make a mess on the outside of the bottle and not wipe it off. So we put some one million SHU capsaicin extract in the bottle, which we enjoy, but melts the face on most people who aren't dumbasses like us.
Total fail: it turned out the thief also preferred the hotter sauce.