Hi Jennifer,
I'm actually a running coach but have done a lot of swimming... and I saw you unanswered here.
You can train in the pool, which is far better than not training at all. However open water swimming also involves dealing with currents, swells, salt water, a different water temperature and possible cold pockets, decreased visibility, no flip turns, no line at the bottom to help you keep swimming straight if your stroke is a little stronger on one side, and generally no visible goal 25 to 50 meters ahead of you. I would strongly suggest you swim in open water to get used to all of those factors before race day. You risk coming out of the water having swallowed excessive water and air, more fatigued than you expected and quite possibly much colder than you are used to going into your transition. All of these would be negatives for your overall confidence level and performance. You want to prepare for anything that would otherwise be a shock to your system.
You may want to use the pool for form, breathing and intervals as well as the occasional longer swim. Swimming in the ocean would be better for longer swims and what I'll call "navigational consistency" through swells and currents. Assuming you can see the bottom, the lines in the sand are generally parallel to shore and as long as you are swimming a consistent angle relative to them, you are generally swimming in a straight line, which will decrease the frequency you may need to pop your head up and see if you are still on track for the buoy or whatever you are aiming at. You can also alternate your breathing side to periodically keep wherever the shore is in some kind of view unless you are heading straight out. If you can handle the ocean, you can handle a lake.
In general, you do want your training to incorporate and mimic the intensities and difficulties of your race events, but it should ultimately also involve going faster than your race pace at shorter intervals and longer than your race distance at a slower pace as well. The closer you approximate the race conditions, the better your preparation.