Is there any way to tell whether the shot is going to hit you or not?

To my knowledge, there is no exact way to tell if a bullet will graze you or not. My general rule of thumb is perpendicular motion for half a second or so, always favoring more over less time.

Slight spoilers on the bullet trails below

I think what you're referring to with bullets is if a bullet is very close to you and you are holding the katana it will change color allowing you to click it to cut the bullet in half nullifying it.