i wouldnt do it, i belive betta's are too aggressive and the colour of the danio may make the betta think its another male, and therefore want to kill it.
I have 6 Zebras in with a male crown tail and they get along fine. I belive the Bettas get aroused with large fins and very bright colors. Zebra has neither. BTW, I have a 26 gallon tank though. Once in a while I think the Betta tries to play tag with a Zebra and it just swims lazy for a second and then splits. My zebras are hyper and always chasing each other around.
my male VT is in a community tank with a zebra danio, and sure the betta chasses him a bit but the danio doesnt seem to care, he swims close to the betta just to taunt him
The betta would be the only one suitable for a 6 gallon tank.
Even though danios are small, they are extremely active fish and need a larger tank. I personally would not put danios in anything smaller than a 20gal tank.