I have been going to a prenatal clinic! Is phenobarbital okay for fetus?

Not really. Mom first, then baby. Sometimes we don't have much of a choice in these matters. Many times, at the end of the day, the benefits may outweigh the risks.
Generally no. Only rare rhesus maternal-fetal incompatibility merits maternal Phenobarbital ingestion after 35 weeks to help the fetal liver mature faster and metabolize the anticipated increased bilirubin load more efficiently. Other than that specific (rare) indication, pregnant women should avoir all barbiturates, as they cross the placenta and affect the fetal brain as well.