I don't think a bean bag chair would work, unless it's very firm, but yes, the exercise ball type thing is very good for your posture.
Your spine is supported by your core muscles (abs, obliques, back), and sitting on a moving object without supports (i.e. chair arm and or back) forces your muscles to support you. This constant work helps keep your core muscles strong and in turn helps your posture, which leads to better spine health.
I wouldn't jump right into using the ball as your go-to chair at first though, the amount of work it takes to sit like that for an extended period of time is a lot more than you may think. An easier solution may be to just sit on the front of your chair and sit straight up, like a musician.