It's a common mistake (not present in the code you provided but still possible, warning just in case) that people erroneously think that if you put a lock in some place all other places where object is about to be used will automagically wait until the lock is released. You need ensure you enter the lock in all places that use your factory, that is your object should own the factory (see lock for more details).
As to your code - technically speaking it is correct because using statement won't throw exceptions if disposable object happens to be null. But since the method is public and factory is passed from outside you break the rule of locking only on objects you own. And also there is no guarantee that other code with access to factory properly locks on it.
And finally, factories are usually objects that are thread safe (can't think of any that is not), so if you own the code for the factory I would recommend to refactor it to make it thread-safe, otherwise create a thread-safe wrapper around original factory.
Or, if your factory is lightweight just create a separate factory per thread as svick suggested.
factoryClassis a very bad name for a variable. – svick Jan 25 at 22:27