If the algorithms are otherwise identical, sure.
Often the memory being used is doing things like pre-loading information from disk or the network before it's needed, or caching results for reuse.
Or it's storing the information in a faster but less dense data structure - kind of like denormalizing a database for performance reasons.
Adding memory often makes an entire system faster (again, because you can cache things in the faster RAM rather than paging out to disk). But for two comparable programs, I could see the argument that the lower-memory footprint program would be faster. (For comparable programs).