The Welshman is expected to miss the next two to three weeks as he completes his recovery.
The 24-year-old has started just three Championship matches for Derek McInnes' side so far this season, and will have to wait until next month to force his way back into the side.
The Robins currently sit 23rd in the table, and have the second worst defensive record in the division, having failed to keep a clean sheet this term.
McInnes said: "It's something that has been bothering Lewin and we had to get it sorted.
"Hopefully the surgery is okay and he should be back with us in a fortnight or just a little longer."