I don't think this will help you in your situation, but in case anyone else is getting this error, here's what helped me. I was trying to run a spatial join on a hosted feature layer in ArcGIS Online with a local feature class in Pro. Got this error: ERROR 160244: Object has no schema locks.
I reprojected the local feature class into web mercator like the hosted feature layer and then it worked fine for me.