Would the shimano freewheel removal tool be roughly compatible with a Sram/shimano cassette?
The freewheel tool is of a smaller diameter to a cassette tool but the splines don’t fit the cassette lockring because the spline dimensions (width) don't match, as seen in this photo of the freewheel tool viewed through the back of a cassette lockring. The lockring is resting on the tool without engaging:

So you can’t use one tool for both, and modifying one to do so would be ineffective, I expect it would slip under torque.
Whilst it might be possible, depending on tool &amp; lockring tolerances, to hammer the freewheel tool into a cassette lockring, I wouldn't do that myself; the correct tool doesn't cost a great deal and saves damaging tools/parts.