But the dealer says that the firearm can be returned as long as it hasn't been officially transferred into my name.
Im not sure what he means by this. If he is an FFL, which from the sound of it he must be or he is in serious violation of the law, as soon as he sells the gun to you it has been legally transferred into your name. The only thing I can thing of is that you might be able to return it if it is before he files some sort of paperwork, though acording to federal law we dont have national gun registration, and records are supposed to be maintained by the FFL.