Core strength is important, but also what gear are you riding in?
Your small ring, and middle ring (in front) aren't usually sufficient for riding no hands and maintaining balance whilst doing so. Switch to the big ring in front and a small ring in back and pedal at a decent speed. That is the only way I know of to get it done.
You can leave one hand on the bars (nothing is wrong with safety), which I recommend in urban areas. Master pulling the water bottle out one-handed and replacing it at low comfortable speeds. Not everyone needs to ride "no hands." Hydration and your personal safety are more important than looking cool.
"Things look different from the seat of a bike carrying a sleeping bag with a cold beer tucked inside." ~Jim Malusa
2009 Trek 520-Brooks B-17 Special in Antique Brown
2010 Surly Long Haul Trucker-Brooks B-17 Standard in Black
1983 Fuji Espree Single Speed-Brooks B17 British Racing Green