The second meaning is more relevant to Islamic finance. Here the owner allows another person to use an asset for an agreed period against agreed rent.
The owner/lessor (مؤجر) keeps ownership. The user/lessee (مستأجر) receives the right to use the asset. The rent for that use is called ujrah (أجرة).