To get into Yellowstone National Park you'll need a permit for the park to enter.
When you drive up to go into Yellowstone National Park you'll see a gate with an attendant where you'll need to purchase a pass to enter the Yellowstone National Park.
The Yellowstone National Park pass is $25.00 which is good for a year of entering the Yellowstone National Park.
The park pass allows you to get into both Yellowstone and Grand Teton parks.
Then you can camp in Yellowstone with that park pass and they have campgrounds where you can tent camp or camp in a travel trailer or other RV.
Those campsites range from primitive with no electricity and others have electricity for an extra cost.
I've seen some people just camping away from the campgrounds in their camper trailers or Motorhomes before so I guess you could.
I've never seen anyone get told to move or leave the area.