The interaction of localised solitary waves with large-scale, time-varying dispersive mean flows subject to nonconvex flux is studied in the framework of the modified Korteweg-de Vries (mKdV) equation, a canonical model for nonlinear internal gravity wave propagation in stratified fluids. The principal feature of the studied interaction is that both the solitary wave and the large-scale mean flow -- a rarefaction wave or a dispersive shock wave (undular bore) -- are described by the same dispersive hydrodynamic equation. A recent theoretical and experimental study of this new type of dynamic soliton-mean flow interaction has revealed two main scenarios when the solitary wave either tunnels through the varying mean flow that connects two constant asymptotic states, or remains trapped inside it. While the previous work considered convex systems, in this paper it is demonstrated that the presence of a nonconvex hydrodynamic flux introduces significant modifications to the scenarios for transmission and trapping. A reduced set of Whitham modulation equations, termed the solitonic modulation system, is used to formulate a general, approximate mathematical framework for solitary wave-mean flow interaction with nonconvex flux. Solitary wave trapping is conveniently stated in terms of crossing characteristics for the solitonic system. Numerical simulations of the mKdV equation agree with the predictions of modulation theory. The developed theory draws upon general properties of dispersive hydrodynamic partial differential equations, not on the complete integrability of the mKdV equation. As such, the mathematical framework developed here enables application to other fluid dynamic contexts subject to nonconvex flux.