The last sentence of your question, provides some insight to the answer here. If your dog is not well trained now, and she is used to wandering, it would take significant work to train her not to leave the yard. While not impossible, without constant supervision while she is out, it is unlikely to be successful.
You also indicate concern that the fence can be made so she is unable to escape. This is a valid concern and limits your options for keeping your dog safe.
Given the available information I would suggest a cable run. There are multiple images and products available via internet search. I have used the devices very successfully over many years.
The idea is that an overhead cable is installed running between your house and a post or between two trees, or something similar. A leash or chain is suspend from the cable which is allowed to slide (or roll) up and down the cable giving the dog lots of room to roam, and keeping the dog safe and secure.
Extremely Important There must be nothing for the dog to get tangled around, or anything (like a picnicking table) for the dog to climb on while connected to the run. Dogs can be seriously injured or killed if the leash gets caught (i.e. jumping off a table the dog can get hung)
Normally an eye hook is screwed into the house near the door (over head height). A post is placed firmly (dig deep, use concrete to secure) in the ground 10 - 20 yards (or meters) away. A cable is run between the house and the post. A pulley is used to connect a chain or leash to the over head cable. Measure out from the post the length of the chain or leash and put a cable tie or block that distance from the post. You do not want your dog to be able to go around the post.
Put a second eye hook near the door at the height of your dogs neck. When you unfasten the chain or leash from your dog you can clip it to this eye hook and it will always be easy to find.
MAKE VERY SURE THERE IS NOTHING FOR THE DOG TO GET TANGLED ON. Depending on your dog and your situation there are many variables, it is up to you to ensure you have created a safe system.