Yes, you can reuse animal numbers.
When a farm animal is removed from the farm and registered with an Exit date, then you can re-use the animal number from the day after.
When you search for animals later be aware whether you find active or removed animals.