The RSPCA can only prosecute farmers for cruelty if they have broken laws relating to animal welfare that apply in their state or territory. If farmers are operating within the law, the RSPCA inspectors who enforce animal protection legislation cannot prosecute them.
Under most state and territory legislation relating to animal welfare, it is an offence to cause an animal unnecessary pain; however, farm animals are often exempt from such legislation. Some surgical procedures may only be undertaken by veterinary surgeons, but others may be undertaken by nonveterinary (lay) people working on farms provided that they follow accepted husbandry practices. These accepted practices are set out in the Australian model codes of practice for the welfare of animals (https://www.publish.csiro.au/foodandagriculture/livestockcodes), and the Australian Animal Welfare Standards and Guidelines (http://www.animalwelfarestandards.net.au). These documents set minimum standards for people involved in livestock production.
The codes and standards may recommend that anaesthetic or pain relief be used for certain procedures, but if these recommendations are not mandatory they are not enforceable. In most states and territories, the codes and standards have been referenced into the law, which means they can be used as a defence in a cruelty prosecution. In other words, demonstrated compliance with a particular model code or Australian Standard can see a cruelty charge dropped.
The RSPCA would be able to prosecute in cases involving individual animals if husbandry procedures were undertaken in a way that clearly contravened the relevant model code or standard.