"I need an ambulance, please."
Translation:Tá otharcharr uaim, le do thoil.
Teastaíonn otharcharr uaim le do thoil should be perfectly acceptable.
As to the meaning, the form of bí ó can only mean 'want'. It got accepted as 'need' because of a non-literal translation, which is some dialects (my own included) would still have used 'want'.
As for teastaigh, it depends. In some dialects, teastaigh can be either 'need' or 'want'. However, in Connemara, it can only be 'need'
If the full sentence you had in mind was "tá otharcharr de dhith orm", I think is should be accepted. (https://www.focloir.ie/en/dictionary/ei/need). But I also suspect that this another instance where Duolingo didn't code all of the possible ways of saying "I need." And in all my time on the Irish course, I can't recall seeing a sentence using the "de dhíth [ó]" construction.