Various verbs may be followed by different prepositions in order to complete or modify their meaning. In the case of dweud it is wrth or am:
- dweud wrth rywun am rywbeth - telling someone about something
- dweud rhywbeth wrth rywun - telling/saying something to someone.
Many dictionaries will have examples that show which prepositions are used. There is a useful small book which lists which prepositions follow which verb-nouns - 'Pa Arddodiad' by D Geraint Lewis.