It could be translated that way, although ar an mbaile is a better translation of “in the town”. (Prepositions don’t always exactly correspond between languages.) Don’t be concerned at all about whether it results in being marked wrong or not; the whole purpose of beta testing is to find such problems (and to correct them) before a general release, and the Duolingo Irish course is still in its beta testing period.
"I have a friend who is in their house".
"I live in this place, but I have a friend from my home town".
"I may not have a friend at work, but when I'm at home I do".
I understand that the given sentence couldn't translate to all of these, but in a colloquial sense, could these all be appropriately used and understood?
It kind of actually can. "baile" is most straightforwardly translated as "settlement". A city is a settlement, as is a village, a homestead, or a town. All of these translate as "baile", but are different kinds. Typically, if you want to be precise, you would refer to a city as "cathair", but historically, that just means it's enclosed with a wall.
Though please read the other comments. "Sa bhaile" means "at home".