"We will buy us ice cream and we will go to the port."
Translation:אנחנו נקנה לנו גלידה ונלך לנמל.
It really should be "We will buy ourselves ice cream..."
Just as "I'm gonna by me a car" or "I'm gonna get me some payback" are incorrect, If you do something for you, then you ought to use the reflexive pronoun.
I don't understand : I was marked wrong in the previous sentence for using the pronoun. So here I didn't use it and I am wrong again for not using it. Can someone explain?
The pronoun in Hebrew is always optional when unambiguous. You are correct if you use it, and correct if you don't. That's what we get by having so many forms of the verb. You couldn't do this in English: "will buy ice cream" is unclear because you could plug a number of pronouns before that. But in Hebrew, "נקנה לנו גלידה" is very clear, because you have the first person plural form of the verb.
So why do you get marked? Duolingo does not speak Hebrew (or English or Spanish for that matter). For each sentence there is a closed list of correct answers, and Duolingo does a fuzzy match of what you typed to this list. If you type the pronoun and the answers on the list don't, you get marked wrong, and vice versa.
This is what the report button is for.