Yes, you can compost avocados – though the different bits of the fruit will take different amounts of time to break down.
Avocado flesh will very quickly rot down but the tough skin will take longer. If you want the skin to rot down quicker, or at least be less of a problem in your compost, slice it into strips before adding it to your heap.
Avocado stones will take frickin’ ages to turn into compost though – if you have a basic heap and don’t want the stones to be hard lumps in your future compost, leave them out. You can read about other things to do with fruit stones on How Can I Recycle This?
Oh, and if you catch an avocado that’s over-ripe but not completely icky, don’t forget you can use it to make a deep conditioning hair treatment or facial mask.
A few years ago I found two avacado trees growing among my potatoes and they are still growing although I bring them in in winter.
Can I put raspberries in my compost pile?