It could be both. Because of the buildup / sewer deposits inside the drain pipe, it might not be capable of handling significant amounts of water discharging from the sump pump. Venting could be also an issue, however, is this something that started happening just recently, or it’s been like that for a long time? Does it also happen when the washer discharged into that line?
If it’s something recent, I’d go with the sewer pipe being partially clogged. You’d have to open the cleanout or separate it preferably at the sump pump discharge pipe connection area, and check for clogs / use rodding equipment if necessary.