Does "ぞ" make it more masculine-sounding or is it a different dialect?
The both やばいぞ and やばいよ are not dialect, these expressions are used when one is getting involved in an unfavorable situation.
-ぞ is often used by male and sounds stronger. -よ sounds softer. For example, imagine a gang of thieves trying to steal something. Then one of the gang member noticed that some polices saw them and started to approach, so he warns his company.. In a situation like this, やばいぞ！ would be used better than やばいよ！