Most universities don't really give a rot about your overall result, what matters is lab experience you and what scores you got in relevant modules/the relevance of your BSc course. If you get a 1st with a written dissertation and scored badly in relevant modules, it's not going to look as good as a 2:1 student with an experimental project and relevant modules. But in short, yes, you can go straight onto a PhD with a 1st class if your BSc had relevant modules