Although some dogs do fine with chickens, especially those trained to behave around chickens from a young age, It is all too common to read about chickens that have been killed by the family dog. Even a full grown chicken can not defend itself against a dog. Although may roosters may try to defend the flock, their only real form of defense is intimidation, and that doesn't work on many dogs.
I have 2 spaniels and the young one is only now trustworthy with the flock and she is just turned 3. It has taken firm training and patience. I do not take her in the field when they are free ranging although my husband does. She is a fully trained working gun dog but went through a very bad time when she killed 5 of our chickens altogether. The male would not touch them but he gets very excited if she is behaving badly. This week there have been chickens in the garden (!) when I've let the dogs out and she has not touched them so I am highly relieved!!
I have a chihuahua and a shih-tzu...both of which treat the chickens as equals. When the chicks were tiny, I never left them alone with the dogs (just in case!). But now that they are full grown, I have no problem at all letting the dogs out in the yard with them. The chickens have actually run up and taken food from the dogs. The dogs just walk away and get something else (I'm sure they are cursing the chikens and ME)
You also have to consider the breeds. If you have a breed that has been a hunter for hundreds of years, it would be more difficult to "teach" him not to kill the chickens (certainly not impossible though). But, both of my dogs are from the "toy" group...they like to sit on us, not hunt things.
i think there are dogs who have been trained to such a level they can be pretty well trusted. i also thing there are some dogs who are such nurturers by nature they can be trusted. all the other dogs are going to do what dogs do - their instinct will drive them. they can be trusted as long as they know you are watching, but when unsupervised, will give in to temptation.
my dog killed 10 of my 14 birds. i am now actually letting my birds out in the backyard while i'm there for 20-30 minutes. the dog does very well - but i will not trust her unsupervised.
As odd as this sounds I would fully trust my beagle with my chickens but not my mutt mix. My beagle is NOT the hunting dog he is supposed to be, lol He could care less about other animals. My mutt has a VERY high prey drive. I would never trust her out in the yard alone with the chickens, EVER. Even if I think she has started thinking they are pets. All their flapping and running is to much temptation for her.
By necessity I trust my bird dog around my flocks. He is charged with keeping hawks, foxes and coyotes out during day when I am not present and all sorts of varmints at night. He has access to brooder even when I am not home. He is also a very active dog but most of his energy is directed at predators and toys. ,
As a pup he killed a couple chicks. It took a little work to get him where he is now but well worth it.
I have always used dogs around poultry and feel they are needed in my free-range setting where fences do not contain poultry or exclude predators, despite fences being present.
With respect to chickens defending themselves, generally no. I have hens and roosters that can repell a submissive adult or pup but any dog greater than 10 lbs that is also determined can kill even the largest and most aggresive chicken. My chickens most reliable protection is flying up into trees or into barn where dog can not follow.. The chickens have to get up becuase they cannot outrun a dog that is even of reasonable health. Chickens are not long distance athletes, they are energy-effecient sprinters that are not to terribly fast either.
I am training my rescue chihuahua to be around chickens. She is ~ 1 1/2 years old and she doesn't seem to get too excited around them. I keep her on a leash around them and I think in time she will be OK. On the other hand, my almost 2 yr old Brittany bird dog is way too excited around them. I keep 2-3 lines of defense between the chickens and the dogs. The chickens stay in their run and there is a side gate and a kennel gate between them. I try to keep a "buffer or dead space" between them, which helps prevent catastrophe. (I can forget to close one gate and still be OK). When my bird dog is in the main back yard she is usually hunting butterflies and looking for the ferrel kitty, and she can't really see the chickens from the main back yard or her kennel, so that decreases the "excitement" or frenzy around the chickens. Maybe when she is older I will try to desensitize her to the chickens.