Say I have an application compiled against types in a package x.y that is no longer available. Suppose that all of these types have been moved to a package a.b. Can I use byteman to transform the application to run in a container that has the a.b package based types?
Afraid not. Byteman only injects code into methods. You really need something that transforms the relevant symbol table entries.
Have you looked at the maven shade plugin? It can do what you want offline.
If you really need to do the online then you can probably cook up a Java JVMTI agent to do what you want with only a moderate amount of relatively straightforward ASM programming needed to do the bytecode transformation.