Yes, you can generally keep it as a pet as long as it is tame, and it was still very young when you found it.
If it’s eyes were still closed and it had little fur when you found it, it is very likely that it will view you as a friend when it grows up, and unlikely it will have any parasites (internal or external.) As with any animal in the wild, once it has fur there is the chance it could have external parasites, and once it is no longer protected by antibodies from it’s mother and her milk, and starts eating solid food, it can be exposed to internal parasites, viruses and etc. As a general rule of thumb, the dividing line is around the time it’s eyes open.
If it’s eyes were already open when you found it, it is not totally hopeless, but you should probably have it checked by a vet. At that age, it should be able to easily escape (and it will normally want to) unless it has some injury or illness. After you treat the underlying issues, then you can evaluate what to do based on it’s behaviour.
Once it’s eyes are open, and both you and the rat will need to decide its future. Mostly the rat will decide: If it seems to want to run away, then find someplace to release it safely. You will both be happier.
But, if it seems to like being with you, doesn’t seem fearful, accepts handling and isn’t trying to escape, then you should consider keeping it as a pet. It will probably live a longer, happier life with you than in the wild and, besides, it has developed feelings for you at this point. Rats are intelligent and social animals. Although they are small and their lives are sadly all too short, they are capable of love and friendship just like us, and if your rat has developed an emotional bond with you, turning it out into the wild to fend for itself would seem, well, inhuman. So, if your rat loves you (and you’ll know if it does), my heartfelt advice is to love and care for it for the rest of it life if at all possible.