Trespass Act 1980, s 9
Yes, if you’re already on the property, then the occupier or the police have the right to require you to give them your name and address. If you don’t do this, or if you give fake details, this is a criminal offence, punishable by a fine of up to $500.
Also, if you don’t give your name and address a police officer can give you a caution that you could be arrested. If you still don’t give your name and address, the police can arrest you.