Dropsy can be caused by various things - including poor water quality and bacterial infections. If it was a bacterial infection that caused it then there is a good chance it can be passed on to a new fish. There is really no way to know.
If it were me I would tear the tank down, disinfect everything I could, replace the gravel, and start over. I do that any time I lose a betta and put a new one in the tank regardless of why it died, simply because a new betta that has been sitting in a cup full of dirty water for whatever length of time will probably have a weakened immune system.