Yes, "nac ydw" means "no, (I do not)". "Na" ( nac before a vowel) is used to form the negative answer. Similarly: nac wyt = no, you do not; nac ydy = no, he/she does not; nac ydyn = no, we/they do not. I suppose you can look at "na"/ "nag" as the "not" in these phrases but in Welsh the word order is changed.
'Dych chi eisiau' = 'Are you wanting'; usually written 'do you want' in English.
'Afal' can be either 'Apple' or 'An apple' since there is no indefinite article in Welsh
'Nac ydw' = 'No I do not' or 'No I am not' = normally in the context of this sentence in English this would be 'No'
Put the whole thing together
Dych chi eisiau afal? Nac ydw. = literally 'Are you wanting apple? No I am not'
We transpose this in English to 'Do you want an apple? No' or sometimes 'Do you want an apple? No I do not.'