We do not have a yard (we live in an apartment) so it is possible to do without a fence but I can see a fence would be nicer. When Neb was a puppy I lived in a house without a fence so I have some idea.
But yes, beagles are not off-leash dogs.
You're doing great with Arya though! Good idea to get her microchipped for sure.
Have fun at puppy class! I take it you're in the Netherlands? My aunt and uncle (and cousin) lived in the Hague for years, my aunt and uncle are back in Toronto now, my cousin has just started teaching and I know she'd love to go back. It's a beautiful place.
With the peeing accidents, crate training might help. In a small enough area, I think - Cassie can probably confirm, it's been about 11 years for me - that they are less likely to want to soil their area so they learn to hold it a bit better. Neb also went through a destructive phase from a teenager to early adulthood so the crate was a lifesaver (he destroyed an easy chair, destroyed boxes of books, etc, etc). I saw on another thread you were asking how to crate train - I just stuck Neb in there was a toy or kong with something stuffed in it and let him be at first, and then he got used to it. He hasn't used a crate in years, but it's good to be able to rely on in a pinch (we have them for both boys).
Neb, Beagle mix, born April 2008
Xerxes, Beagle, born 2016
RIP Luc, German Shepherd mix, July 2003-December 2018
Timothy and Cordelia, kitty cat terrors!