Your O'Day 30, if in good shape, is certainly adequate for the trip. And, she's no doubt small enough to be able to make it through the bridge at Cape May and run at least part way up the coast inland from Cape May.
Time? Last couple of times I made the trip from Annapolis to Block Island (off East end of Long Island) it took a couple of days (about 41 hours), though in larger boats than yours. Up the Bay, thru the Canal, down Delaware Bay, around Cape May, then straight shot for Block Island.
The distance from the East End of the C&D Canal to Block Island is 269 nautical miles if you go way around Cape May. If your mast will go under the bridge, as yours surely will, it's somewhat shorter...you don't have to go out so far. And, if you go outside there are places to duck in all along the Jersey coast enroute to NY if you want/have to: Cape May, Atlantic City, Great Egg, Barnegat Bay, Manasquan Inlet, Sandy Hook.
Maybe your dream isn't so distant??