IIRC the first camera with focus trap was an Olympus of the OM system which had assisted focusing, it was a derivated of the OM-10. For those who don't remember, before autofocus there was assisted focusing, and it was good for those who were somehow sight-challenged. Instead of relying on microprisms or such, your camera gave you three leds in the viewfinder, one pointing to the right, one to the left, and another one telling you focus was OK. If you forgot your glasses in your car, or had to use somebody else's camera without a dioptre, well that might have helped. Also it made things like focus trap possible.
The first such camera was IIRC an Olympus based on the OM-10, followed a few months later by a Canon model (some kind of modified AV-1 maybe). The Olympus surely had this "focus trap" thing, which obviously worked with any manual focus lens (autofocus lenses were yet to come).
In the autofocus field, Nikon F-801 should have had the "focus trap" function with an optional "data back" that performed many functions besides impressing the date.
So, to answer the questions of the OP: focus trap is a function of the camera, which must have some electronic focus detection capability.
If the camera is an assisted-focus camera, it would work with any lens for that camera (manual focus lens, that is).
If the camera is an autofocus camera, you have to see it case by case but I would guess it would work with any lens anyway if the mount is the same (Nikon, Pentax) so that you don't need an adapter ring.
Autofocus devices don't like stopped-down diaphragms so it would probably not work properly with a stopped-down lens of a different make used with an adapter ring unless you use it at a fairly wide aperture.
Fabrizio