No one can say you it's 100% safe. In some countries barbers don't use propper machines to clean tools. Check hbs after few weeks and get vaccinated, problem solved. Even if you catched hbv, 95% of adults clears the virus in 6 months.
it was without any blood just a small scratch
low risk but it's possible