Is a child allowed to buy a pregnancy test?

Yes. Anyone can purchase a pregnancy test.