To get stuff frot their dams place a sleeping bag, transfer the whole dam inventory then let them kill you. After respawning retake your stuff again, they dont attack you anymore.
Wild castoroides sometimes build dams which can contain cementing paste, wood, silica pearls, rare flowers and mushrooms. But accessing the inventory of a dam will make the beavers angry so watch out!