Text to Phone numbers
There a many 'chat' apps that can send text to IDs of people using that same app, such as AOL or Yahoo Messanger.
The problem is sending to a phone number.
The only app I have that can do that outside of the Apple ecosystem is Skype. But Skype is not free when used that way. Skype has its own VOIP system for this and they charge for it. When you get that system it is free to text, speak with and video chat with other Skype users. There is a way on Skype to determine how much a call would cost, but I don't need to explore that here.
You do have to prepay, which is used up as you call. The remainder is shown on screen so you know when to add money.
It is a pity that Skype was bought by Microsoft instead of Apple.
There is place for iPhone users on the Contacts app where put your friend's phone number if they have an iPhone. You can text, chat or video chat with them. Apple has no way to do this outside of Apple products.