Nothing to do with dialects... There are two number systems in Welsh, decimal (newer) and vigesimal (older, still widely used, especially with time, ages, money). I think there is a wikipedia article or similar which explains them. It will also be explained in any good Welsh grammar book.
twenty = ugain in the traditional counting system
For some reason, using ar in front of ugain causes it take an h-. You will see this in telling the time:
- Mae hi'n ugain munud wedi wyth - It is twenty past eight
- Mae hi'n bum munud ar hugain wedi wyth - It is twenty-five past eight
ugain for 'twenty' is correct. We have heard reports that there is currently a bug in the Duolingo software which may perhaps be causing a problem with correct answers sometimes being rejected.
If you are using the app, updates are issued fairly regularly, so make sure that you are on the latest version. Unfortunately, Duo do not put out release notes saying what changes and bug-fixes are in the updates.
If it happens again and you can get a screenshot, it would be helpful if you were able to forward it direct to Duolingo with an explanation of exactly what happened.