-
I've not tried a floating container, but a kilner type jar standing in the water / sitting on the bottom of the bowl has worked for me - most cleaners carry warnings against using flammable liquids, but a lidded jar prevents the vapour escaping in a potentially explosive way. This was admittedly for carburetor parts, so you'd need a bigger jar for a chainring.
I would guess that a flexible bag above the waterline would allow too much energy to escape for cleaning to happen?
I’ve found that the large metallic ones are useful for bike parts. Depending on the shape of the bowl, 3-5 litres is about the smallest you might want for cleaning chainrings and cassettes.
As an add-on to the above, if I put a container with liquid to float in an ultrasonic cleaner, will the cavitation effect still happen inside the container? If so, will it happen above the cleaner’s water line? And if so, could one put a chainring in a plastic bag with cleaning liquid, submerge it partially (vertically) in the cleaner, and expect it to clean more than the submerged bit?