Yes, it can be done, but I'd have a few practice runs first. One run to establish the width and depth of the groove for the o-ring. Then probably taking the o-ring in and out a few times to sneak up on the acceptable grip on the tube.
I work a lot with o-ring gas seals and you will be surprised how much effort it may take to pull something out, after pushing it in. Will you be able to lubricate the o-ring with a smear of silicone grease or something?
Will your project perhaps allow a friction fit like you get on a slimline twist mech? A little dimple or two to offer resistance will be a lot easier to make.
You could put the dimples in the same place the 0-ring groove would have been rather than on the removable tube, so it won't be seen. Of course, I'm assuming you would have a tube within a tube...:wink:
Heck, even a very slight bend in the removable tube could work if your project allows :wink: