They can, but it depends on the species. Chinese algae eater are horrible fish in the fish keeping hobby. While they are young and small, they are great for eating algae but as they get older they start harrasing other fish in the tank by sucking off their slime coatings and expose them to illness and disease. Very large specimens of hypostomus plecostomus (your common pleco) can eat smaller, slow swimming fish and invertebrates like ghost shrimp or baby fish when they are newborns.
Algae eaters obviously eat algae, but they also eat several other things. They will also consume fish food that sinks to the bottom of the tank. You can also offer blanched zucchini and green garden peas that have been pinched out of the shells. Algae wafers can be purchased from your local pet store and you can feed them to your algae eaters as a staple diet to make sure they get all the proper nutrition that is not provided by algae alone. Be aware of the type of algae eaters you are interested in. Chinese algae eaters are great when very young, but as they get older they will start sucking the slime coats off the other fish in your tank. Common plecostomus are one of the best algae eaters, but they must be housed in a LARGE tank since they eventually get over 12 inches long.
Algae is a cannibal trust me on this its true they also eat owls computers aliens and dragons