Yes, you can build a granny annexe in your garden so long as you adhere to permitted development guidelines and obtain appropriate planning permission for your building.