The Beaver
The animal you're describing is a beaver. Here's why:
Flat tail: Beavers have a broad, flat tail that they use for balance, steering in the water, and as a warning signal.
Dam building: Beavers are famous for their dams, which they construct using branches, mud, and stones to create ponds for their lodges.
Lives in a lodge: Beavers build lodges as their homes. These are dome-shaped structures made of branches and mud, with underwater entrances.
Let me know if you have any other animal riddles!