Yes, they can still shed and defecate even when they aren't eating. It will be infrequent, but it happens. Make sure temps are in ideal ranges and that the habitat is secure and suitable for the snake. A lot of open space can stress them.