Bali has a wizard object that varies with the characteristics and nuances of each. Each of the resorts have rules and politeness of different sizes. If you allowed to museum entrance by wearing shorts or tank tops. Not necessarily it will be permitted elsewhere. You are usually advised to wear clothing as specified in the local rules. If it does not carry, usually you are advised to hire a traditional dress.
To not bother with clothing rental business, if you like to wear shorts or a casual mini dress, try to buy a piece of cloth beach complete with a scarf to cover your body. While visiting the site you can freely save your fabric in the bag. When you will enter the temple, you can wear the cloth.