What fish are compatible with betas?
zebra fish and African dwarf frogs
For true compatibility always select fish that require the same kind of alkaline water conditions. This restricts your choices to " fish from the same or similar sources". ie other Africans. It is easier to say what fish are not compatible. The answer to that is Most Fish are not compatible with 'Africans' and fish from the 'Amazon' are probably the least compatible.
No, it will not die, but don't be worried by your beta attacking a goldfish. Betas are usually only violent toward other betas, so your goldfish is safe. Also, I believe betas are tropical fish and goldfish are coldwater, but I have heard many sucess stories of betas surviving years in coldwater tanks and bowls. Best of luck