Thank you for this explanation!
I had been racking my brains for months on why the first article vanishes, and I had come to the same conclusion, but without any clear evidence of this in Duolingo's notes.
The 'Countries' unit does show the loss of the article in expressions such as 'the Welsh flag → baner Cymru, but a general rule in terms of "the (noun 1) of the (noun 2)" turns into "(noun 1) of the (noun 2)" is not explicitly mentioned (or maybe I hadn't understood it this way).
If you want a historical explanation, that may help you get it right, the literal translation of swyddfa'r heddlu is the police's station. It's just that Welsh has no 's and the word order is different, but you now have exactly the same in both languages, with the article before 'police'.
The English and the Welsh sentence both contain the same two-word phrase with the same word order: “the police” = “’r heddlu”.
This two-word phrase is being used as an adjective (in English), so it comes as no surprise to see it before the noun (“station”) in English, while in in Welsh it's the owner of the swyddfa and hence comes after the thing owned.
Focus on the two-word phrase, and you no longer see a definite article in an unexpected place: instead you see the usual position-swap in Welsh relative to English for noun/adjective and owner/owned pairs.
That is partially true (in the sense that a possessive is behaving a bit like an adjective and hence there is some similarity in word order), but I think it is misleading, mainly because you are saying that yr heddlu is an adjective, when yr clearly means 'the' which means you are likely to put it before the noun, swyddfa which is where you would normally put an article in Welsh. So this does not work with a real adjective. Further if you think of it this way, you are likely to put in another yr at the beginning to translate the the in English. This is in fact by far the most common mistake when this structure is not taught properly. In my experience, the explanation I give in another post on this page helps people to get the Welsh right reliably.
It has the added advantage of being historically correct. We know from Gaelic and Old Norse (which have an identical structure, but which also have case markings) that the yr is in the genitive, which it wouldn't be if the heddlu were an adjective. This becomes particularly important for anyone who goes on to do the Gaelic or Irish course, since again you need to understand that the equivalent of yr and the equivalent of heddlu have to be in the genitive.
Given that a heddwas has said it is gorsaf, that is pretty good evidence. But I also find it highly likely. These are not things that grew up separately in different places over thousands of years. They are things set up by national regulations. The Welsh term would inevitably be a translation of the English. So where did the idea that it is an office come from? I looked in Ngram and I found out that the original terms appears to have been office in British English, with station overtaking in 1847 and virtually wiping out the office. So I would guess that the old word got into usage before 1847, and into some people's heads as the 'correct Welsh, different from the English', where it has remained ever since, even though almost everyone calls it a station, and, crucially, uses the corresponding word in Welsh.
I can't actually find swyddfa in any dictionary in this context, so I think it must have become quite a niche term after 1847.