I see that a lot in large groups of cyclists. It's usually CBD or THC, not nicotine vape. They'll take one or two puffs at most throughout a 2 hour or so ride. They aren't puffing constantly like addicted tobacco smokers.
I wouldn't use THC in a group ride because I prefer to be at 100%. However some of my riding acquaintances are combat vets with disabilities. They say with regular use you build up a tolerance to the psychoactive effects of THC but it continues to help with chronic and acute pain. They sure don't seem high so I'll take their word for it.
But I use oral CBD for pain -- oil from droppers or capsules. It has a tiny amount of THC, less than 0.5%, which works with the CBD to be more effective than the THC-free isolates. It's very effective, no side effects to my alertness and reflexes. But I don't vape because I'm extremely prone to asthma and bronchitis. I tried vaping CBD a few times last year when someone else offered and it tended to constrict my trachea.