Yes. One with an SPF is best. Remember though the baby is sensitive to light and you don't want to stay in the sun too long, it's not good for the baby when your body temperature hoes up. If your temp goes up so does the babies a lot. Drink lots of water and don't lie in your back.
I'm sure it's not a huge deal, but I personally wouldn't... I know pregnant women can't use bug spray or even certain body lotions/washes. I don't think it'll cause harm, but if you're questioning it Id ask your doctor!