Yes, you can and should remove decorations from your tank periodically to clean them of algae and other gunk. Even with algae-eating fish in your tank, you will find there are places they can’t or won’t clean. Aquarium owners must remove decorations and clean them by hand.
Additionally, uneaten food and other waste can get trapped in decorations where scavenger fish can’t reach it. It is important to get rid of this junk, so it does not pollute the water.
However, never use detergent or any other household cleaners to clean decorations or anything else that will go inside your aquarium. Residue from these cleaners can be harmful to your fish, and may even kill them.
Instead, use hot water and old-fashioned elbow grease. If you need an abrasive substance, you can use aquarium salt, but be sure to rinse the decorations thoroughly before adding them back to the tank.
It should go without saying that this advice does not apply to live plants. Once rooted, they should not be moved. You can vacuum around them, but do your best not to disturb them while cleaning.