I would resist the temptation, & would advise them to not make this kind of offer in future.
To say this is foolhardy barely begins to cover it.
Though you having their Apple ID details isn't directly harmful to you, it is not true for them. You would have total access to their data.
They are not giving you a couple of games for free, they are handing you the keys to their entire private life.
The only direct harm it would cause you is that should they change their password at any later date, you will never be able to update or reinstall any of the items that used their ID.
..and that's apart from the fact that you & they would be breaking the terms of your license agreement & basically stealing the software.