Can a pregnancy test determine if you will need a c section?

With 40% accuracy. If you are pregnant in the us nowadays you face a ~40% cesarean section risk, so in that sense a positive pregnany test must prepare you for the possibility ahead, .
No. A pregnancy test just determines if the woman is pregnant or not. It provides no information about the need for a c-section.