Is it possible to use F5 OneConnect with non-http traffic? It seems like it might be possible to create iRules that can figure out when to attach/detach, but I haven't seen any examples.
Yes, its possible. As per F5 AskF5 SOL7208:
The OneConnect profile may be used with any TCP protocol,
but will function only when applied to virtual servers that
are processing simple request/response protocols where
transaction boundaries are explicitly obvious, such as those
in which each request and each response is contained within
a single packet.
So it would still depend on the protocol that you want to load-balance. What protocol are you going to load balance?