Your current chain was sized for a single 46 tooth chainring (aka "front sprocket") and you are going to replace the crank with a double with 52/40 tooth chainrings so your chain is very likely too short. After you choose your new 5-speed freewheel (aka "rear sprockets") size your new chain to match the 52T chainring and the largest cog you have.
BTW, you can continue to use a "7-speed" chain with the 5-speed freewheel and actually you will find most of these chains marked as 6/7/8-speed.
As to the derailleur, if the pulleys are badly worn and it doesn't shift well, it should be replace too. I assume your bike has friction shifting of some sort with stem, downtube or barend shifters so almost any rear derailleur will work and an inexpensive one should be good.