The more I think about whether people say ‘ei phrynu hi’ o’r ‘ei brynu e/o’ when referring to an unknown gift, (or in my style of Welsh, prynu hi, prynu fe), the more I think that I’ve heard both, but would still use the masculine form personally.
Half-baked justification coming up, but please note that I have no academic proof or back-up of this, it really is just how my mind works.
We don’t go to a shop to buy a gift (feminine), we go to the shop to buy a ‘thing’ (masculine) or even less specifically ‘something’ that will then become a ‘gift’. To reiterate, the thing or object (again masculine) in the shop is not a ‘gift’ or a ‘present’ until we say it is. A necklace is a necklace (feminine). A book is a book (masculine). A ‘gift’ is a concept. We might give a necklace or a book to people as gifts, sure, but they are not originally called ‘gift’ or ‘present’. They are merely ‘things’ that we will gift (verb) or present (verb) people with.
If you are the lucky recipient of someone else’s act of giving and you don’t know what you’ll be gifted with yet, let alone its gender, then the pronoun ‘it’ in "Have you bought it yet?’ refers to ‘Have you bought the thing (masculine) yet (that you’ll be gifting to me as a present)? Wyt ti wedi ei brynu e eto? Wyt ti wedi prynu fe eto? Then you might go on to ask… What is it? Beth yw e? meaning ‘what it is the thing you’ ll be presenting me with?’ Beth yw e? Dw i ishe gwybod! I want to know!
I think it’s just to do with what you’re replacing the pronoun ‘it’ with.
I’ve got you a present. What is it? It’s a present.
I’ve got something for you. What is it? It’s a…brand new car!
If you want to use ‘it’ as a replacement for the noun ‘a gift’, I guess the feminine form would be fine. ‘Wyt ti wedi ei phrynu hi eto? Wyt ti wedi phrynu hi eto?’…
That said, the feminine’ it’ can sound a bit strange when you then go on to ask…‘Beth yw hi?’ for ‘What is she/it?’ because that sounds like you don’t know what ‘a gift’ is or means: (Q. What is she/it? A. She/it is a gift). You already know that.
What you really want to discover, however, is what is the thing (masculine pronoun it: e/o) that you’re being gifted with. That’s why I’m more likely to ask 'Wyt ti wedi ei brynu e eto? and not ‘Wyt ti wedi ei phrynu hi eto?’ unless I was expecting a specific thing that I knew to be feminine, like a ring, a chain, a new chair etc.