It should work, imo, with an eye toward making sure this wall won't tip/lean outward and collapse. A sandbag (I'd not use dirt; you'd be adding potential debri/mess to your pond) would be a large rock in its way, so you're building a rock wall. There will probably be some water transfer between pond and bog but I don't see it as a problem as most of the water will push up through the 'easier-to-penetrate' substrate of rocks and gravel. In time, I imagine the sandbag wall would clog up to some extent and you'd have less transfer. I've not done a bog this way, but those are my thoughts.
What I did was to use a single liner for both bog and pond. My bog is dug down about 2' or so below the pond surface while another 12" lies above. I built from ground-contact treated 4x4s a box and this is what holds all my gravel/pipes/liner. If you have the option, you could do this instead of your sandbags, thereby knowing you have the pond holding the box on one side and the bog stone on the other with more construction surety. This also allows you to shape the 'box' any way you want. You'd dig a shelf then, 12" or so below pond height and use this as your platform/base for your bog box.
Just an idea.