If I get a bachelors degree without a high school diploma, will I be able to study masters or PHD?
The general philosophy of university and graduate admissions is that your most recent experience counts most heavily. Your secondary school experience is important to getting in to a Bachelors degree program, but, as you note, there are exceptions. 

But if you successfully complete a BA/BS or equivalent you will be considered for graduate school along with any other candidate with the same degree. It would be very unlikely anyone would ask for earlier work. But even if they did, it would be inconsequential compared to your work on the Bachelors. 

There should be absolutely no worries about this issue, provided you do well in the Bachelors work. Your performance there matters, of course.