N1QL support number which is float64 2**64 ( high end numbers can loose precision due to floating point rounding).
You can can convert 128 bit into string of fixed length (leading/trailing zeros). Then You can do range comparison on strings.
Example: "000000000000000000000000000000000011000" < "000000000000000000000000000000000110000"
If ipv6 address ranges are left to right you can convert individual parts has leading/trailing zeros with fixed length.
Check this how timestamp is stored in ISO-8601 format can easily string comparable (https://fits.gsfc.nasa.gov/iso-time.html). Use similar technique