If I send someone a text, how much information am I giving up? Could they add me to an app like Whatsapp and access my name and profile? Or does their number first have to be saved in my phone contacts for that to happen? What other information could they access just from a text message, assuming I have not added them as a contact?
If you publish you mobile number in a directory such as Spokeo they can look you up
If you use Telegram, the other person will be able to see your public name. Your last seen online time could be retrieved either precisely or imprecisely depending on your privacy settings - this information cannot be hidden completely. Telegram will always tell anyone whether you're currently online (using the app) or not. You can make your profile photo visible only for your contacts.
If you use WhatsApp you can hide your last seen info and profile photo completely from everyone. Your public name can also be seen by anyone regardless.
It's trivial to find out what your cellular operator is and in many cases it's not difficult to pinpoint the location where the SIM card was sold to you.