Short answer: Yes. I've done it. I don't think I'd necessarily do it again.
The main problem is the width of the hub. Older hubs with 5 speed freewheels are a bit narrower than modern hubs with freehubs. So if you want to put a modern wheel in there then you have to either "spring" it in - ie wrestle with the frame every time you take the wheel out or put it in (this involves much swearing), which I did for a while, or you have to "cold set" the frame, which is a fancy term for bending it, which I did in the end.
OK so now you've got a modern wheel in your frame. Maybe with an 8 speed 11-32 cassette on it. Great. Only problem is that probably you can't use the 11T sprocket because you've forced in a cassette that the frame was never designed for and there isn't room to use the little sprocket. Never mind, ignore the little one. It's now a 7 speed 12-32.
Ah, but you've put a modern 622mm wheel in. Maybe your old wheels were 27". Rats, the wheel is a bit smaller. So you may need special long drop brakes to work with the wheel.
Let's assume you're happy sticking with down-tube friction shifters (as I was). That means any potential problems to do with indexing don't arise. If you want indexed shifting then you will have a load of other niggly problems that I never had.
And so it goes. All sorts of little problems. You may not encounter all of the above. They can all be solved. But its a bit of a pain and as I got to the end of my project I was thinking "why did I bother?".
However, now all that's behind me I do have a nice bike (I must admit that it lives on my turbo these days)
View attachment 727365