For starters, your tank was too cold. Bettas are tropical and need a constant temp between 76 and 82 to be healthy. Too cold of water, and their immune system becomes compromised and they won't be able to recover from anything they might contract. Yes, it is possible that she got something from the guppies, but it's also possible that she already had it, which in that case, your guppies are now probably infected as well. Usually when white stuff comes off like that - it's usually their slime coat coming off due to some sort of infection. If your fish was hanging out of water, that definitely means she was ill and maybe was trying to make it easier for her to breath because maybe her gills weren't working properly. My fish did that when she was ill with velvet which coated her gills making it hard for her to breathe underwater.
I really can't say for sure what your fish had, but I am sorry for your loss. In the future, make sure you have warm water, and always quarantine fish before adding them to the tank, just in case one of them has an infection, that way they don't infect the whole tank.