It's both, and your contractor friend is pointing at the part that matters.
An accessory dwelling unit is a secondary, self-contained living unit on the same lot as a primary home. Self-contained means it has its own kitchen, its own bath and its own entrance, so someone can live there without walking through the main house. That's the physical description, and a basement apartment fits it, same as a detached backyard cottage, a converted garage or an attached in-law suite.
The legal side is separate. A space can be physically self-contained and still not be a permitted ADU, meaning the city has no record of a second dwelling on that lot. People in the market use "ADU" loosely for anything that looks like one. Cities use it strictly for a unit that was permitted and inspected as a second dwelling. When you're looking at a listing, the question to ask the agent in writing is whether there's a permit and a final inspection for a second dwelling unit, and what the zoning currently allows on that lot.
Why it matters for money: an unpermitted unit's rent is hard to count. Appraisers may not give it value, lenders may not count the income, and insurance can get complicated if a claim reveals a unit nobody knew about. Some cities have amnesty or legalization processes, and those vary a lot by state and city, so ask the building department directly.
The thing that catches people is retroactive permitting cost. Legalizing an existing basement unit can mean opening walls for egress windows, ceiling height, and fire separation, and that bill sometimes rivals building fresh.