Honestly, July 4th week is a big week. Nothing will really be cheap... if there are even vacancies. You could check Delaware Beaches as well.. Bethany and Rehobeth. I grew up in OC, but havent been in about 5 years.... I don't know if they have built any hotels right outside of OC, but you could check to see if there is anything in Berlin or West Ocean City. Salisbury is like 25 minutes away, but I would not go there on "vacation". Maybe you could find a rental house in Ocean Pines, Md. That is right outside of OC. LOTS of people rent in there and just drive into the beach. July 4th week, there will be LOTS of traffic. It would be ideal to staying in OC, so you can use the buses, even though they will be packed! LOL, I would personally pick another week to go! Good luck, let us know if you find anything! If you have any other specific questions, just ask!
ETA: Not sure how you feel about camping... but you can camp at Assateague Island. I have been there TONS of times, but never camped there...but I know alot of people do!