YEs but their requirments are different. Warm Water Fresh water Goldfish need stong filters Very strong and bettas need soft filters. They may get along now but they may show some signs of aqressiveness later on.
Betta's are territorial and want to be the dominant fish. As long as another fish dosn't show signs of challenging the Betta's Status as King of the tank..they should get along fine. Once the Betta realizes the other fish is no threat to him he goes about his buisness..My Fantail Goldfish gets along well with my Veiltail Betta. They seem to be pals even. The betta just builds his bubble nest and shows off at himself at his own reflection in the tank...no sign of that torwards the Fantail Goldfish. The Betta and Goldfish are thriving together...despite the odds.. I think it's due to the Gold fish not wanting to be the most dominant.