You can turn on both OSPF and BGP routing protocols separately.
The way redistribution works is standardized in a more traditional way, the same way that other routing providers do it. For instance, if more than one route is available for the same prefix, the system RIB will only send the best route for that prefix to the destination protocol if that route type can be released by the destination protocol.
Take the redistribution of the prefix 192.168.1.0/24 into BGP as an example. Routes to the prefix 192.168.1.0/24 can be found locally and have been learned from both OSPF and an additional source as an Overlay prefix. Let’s also say that the OSPF route is better than the learned overlay route for the same prefix based on route metrics, route choice, and the OFC flow ordering for the prefix. This will then move the OSPF route into BGP if BGP OSPF reassignment is turned on. Keep in mind that the overlay learned prefix will not be redistributed into BGP even if the BGP redistribution of overlay prefixes is turned on. This is because it is not the best route for that prefix in the system RIB.
In situations such as the one described above, the user has the ability to arrange redistribution for the particular route type that is the best route in the system. This allows the user to assist the redistribution of the best route for a prefix into a particular destination protocol.