No, turrets cannot be used in the vanilla game. 3rd party mods can be used to add this functionality.