Is it possible for 2 objects to be attached together but both objects are animated differently?
Thats actually really simple. Just Parent your flag to your pole with Ctrl+P. Use pinning in the cloth settings and use Rigid Bodies for the pole or just animate it.