From my understanding you could be able to do this. The reason I say this is that the pineapple can even connect to itself wirelessly (although that would create issues since it is both broadcasting and receiving on the same channel).
In theory, what you should be able to do is connect to the wifi pineapple using the third device then, knowing the ip address of the raspberry pi you could perhaps ssh to the pi. In order to do so the ports on both the pi and the pineapple should be open.
Seeing that by default the ssh port (port 22) is open on the wifi pineapple there shouldn't be an issue to connect through. You would just have to make sure the raspberry pi is configured with port 22 open. I would also advise you to set a static IP address for the raspberry pi.
Everyone, please correct me if I am wrong. I'm still new to all this networking mumbo-jumbo.