Sorry I didn't make things clearer. Before the "Births and Deaths Registration Act" of 1836 births etc were registered by the parish. A parish must have a parish church. A place too small to have its own church was a hamlet. If you were born in a hamlet you might well give it as your birthplace but your baptism would be in register of the parish.
Starting in 1837 the births, marriages and deaths were recorded by registration district which were groupings of parishes. These are how FreeBMD (and all civil UK records) are categorised. Beware that registration districts often have their own sub-districts (which each contain multiple parishes). So in an extreme case someone's place of birth might be <Hamlet> in <Parish> in <SubDistrict> of <District>.
As it happens Ystradyfodwg was a rather unnatural parish to begin with encompassing several quite separate communities isolated from each other by the mountains. I know this because my mother is from one of them! Pontypridd is really a separate town a few miles away but its also the name of the registration district.