Can a freewheel hub be swapped out for a cassette hub?
You say the bike is old, and a 7 speed freewheel hub can be 126 or 130mm over locknut dimension, and the cassette hubs you have will be 135, so that could be one mismatch they saw. But most freewheel hubs on 7-speed bikes from the past 30 years or so have been 135.
Other than that, what you propose should work. The shop might not have realized a conversion of this sort is usually not a big deal.
Note that the flange to flange spacing alone is not exactly what's important. It's the center to flange dimension on each side. Sometimes this is expressed by giving a flange to flange dimension plus an offset dimension, which accomplishes the same thing. But that said, between the hubs in question here, the center to flange numbers are probably almost identical barring an OLD mismatch as above.
Dropping in a new(er) cassette on an otherwise worn drivetrain can cause issues with skipping under load. There are many questions here about this. The shop could have decided to balk at getting into those potential issues.