If "it" was screwed, I could change it on the fly. I know that its is very possible, I just need to know how long to keep the ice on so I don't do more damage than good.
You have to have absolutely no flow in the pipe so it will freeze. Then you keep the dry ice on until you finish the job, but you have to test for flow periodically to find out when it is frozen and then wait a bit longer to ensure complete sealing. You will only have one chance. If it thaws before you are finished, you will never be able to stop the flow. I don't know the actual situation, but if possible, once it is frozen I would insert a Jet-Swet to hold back any flow and use a full port ball valve so the Jet-Swet can be removed afterwards.
I have gotten by with no jet-swet tools for years, but I can't seem to find decent prices on them. That and I usually will not put valves in that don't serve a purpose other than a fixture it serves. I try to drop bellies in the piping, or making sure all of the faucets, hosebibbs, toilets flushed to stop the weeping of water to where I am soldering. Dry Ice is hard to find in my area. Makes for some cool effects though.