yes you can use an inner tube to make a swing. You're better off using a truck inner tube standard size is 10.00 x 20.00. This way adults can ride the swing as well as children.
I would make sure that when you hang the tube from a tree you are at least six feet from the trunk so the swing doesn't collide with the tree. Also make sure you hang the rope from a branch that's high enough. The bottom of the tube should be at lest four feet off the ground, because it will sag once somebody sits on it.
When you tie the rope around the tube, cover the tube with a thick towel or blanket. When you swing back and forth, the rope will rub against the tube and cause the rubber to chafe. The blanket will help reduce friction and give your tube a longer life.
This is what me father did for me when I was four years old, and I got many years of fun use out of my swing. Good luck.