Can a local mongodb instance be used when working with langchain MongoDBAtlasVectorSearch?

Yes it is a requirement. Vector Search is only supported on Atlas Clusters.

That said, if you have a requirement for a Local Development solution you can use our Atlas CLI to deploy something locally, but this is exclusively for development and testing purposes.