Come to think of it, if it worked out, I could see non-prisoners that feel they need help or could help others out going. While NA and AA meetings have the appeal of almost always being done in private, inconspicuous locations, I'm sure that at least a few people might still attend meetings held in a hypothetical YMCA-prison. It could help with situations like these where there is a lot of extra room in the prison. This might be best suited to drug rehab facilities, but I think that the idea could work anywhere with a receptive environment. It would probably be hard to give a prison of a good image though.
According to comments here, it seems like similar systems already exist in some countries. If this is true, how effective have they been?