I'm not sure if you are misunderstanding my response to the OP as to what likely happened, but, again, my response was not regarding Lost Mode. It was regarding the Activation Lock. If the device is still signed in to the iCloud account with Find My iPhone turned on, then removing the device from the iCloud account will only result in in being removed until the device comes back online again.
I have an iCloud account with several devices signed into that account and that also have Find My iPhone turned on. For this explanation, I will be using my iPhone 5s as the "demonstration" device:
1. I go to iCloud.com and sign into my iCloud account (or I go to the Find My iPhone app on any other iOS device and sign into my iCloud account)
2. Listed under Devices on that account, I see my iPhone 5s
3. I click on the device, and put it into Lost Mode
4. I look at my iPhone 5s and see the message I sent to it (if I didn't have a passcode, I would also be required to enter that "Lost Mode passcode" to open the device. As it is, I already have a passcode, so the same thing would have to happen in order for me to access the device - I would have to supply the passcode. The message appears on the Lock Screen.
5. I turn the iPhone 5s off so that it will go Offline (until the device is Offline, I cannot remove it from iCloud.com or from the Devices list on an iOS Find My iPhone app)
6. Once it is Offline, I see an "x"in the upper right-hand corner of the device name, and I click that "x" to remove it from my iCloud account
7. I now no longer see the iPhone 5s on my iCloud.com account (or on the Find My iPhone app on an iOS device)
8. I turn on the iPhone 5s and the Lost Mode messages is gone. If I didn't already have a Lock Screen passcode, the one that I added as a part of setting up Lost Mode would no longer be required to Slide to Unlock the device
9. Once I turn it back on, if I look at my iCloud.com account (or at the Find My iPhone app on an iOS device, I see my iPhone 5s again)
The OP indicated that the device was asking for the iCloud ID and password. These are asked for when you are setting up a new phone and attempting to Activate it. Since the device is still signed into iCloud with Find My iPhone turned on, it is still Activation Locked, and until I erase it, the device cannot be set up or restored.
Since the OP indicated that the person who sold them the device was able to rectify the situation without having to provide the OP with his (the seller's) Apple/iCloud ID and password, and the OP indicated that they signed into iCloud and was able to do "something", that means that the device was showing on the seller's iCloud account again.
I tested this again before i posted back last night. Again, if the device is signed into iCloud with Find My iPhone turned on, then removing the device from the iCloud account does not turn off the Activation Lock. The only way for that to happen is for someone to go into Settings>iCloud, and manually turn off Find My iPhone, or to erase the device. Both actions require the Apple/iCloud ID and the Password. As long as Find My iPhone and the Activation Lock are engaged, the device will show up on the iCloud account it is linked to as soon as that device comes back online, even if it was deleted while it was offline.
GB