Pretty sure you can do whatever you want in a non-commercial game as long as it's truly non-commercial. Remember that just because you don't charge for something, it doesn't mean it's not commercial.
Recently, a professional development studio released a freeware FF7 remake in beat'em up format, which was quickly shut down by Square Enix, for obvious reasons that go beyond the notion of protecting their IP. By using the FF7 IP, this studio was in fact promoting themselves, even if they didn't make money directly from it, thus it's obviously foul play. There are, however, numerous rom-hacking demakes of FF7 for old consoles which Square Enix would never have a reason to take action against because they are truly non-commercial.