Is it acceptable that visitor change the state of object in which it operates? These kind of operation are not considered as anti patterns?
It's completely fine to modify the objects that are visited.
Just make sure that your visitor class is named appropriately, so it is obvious that it has a side-effect.