Does IDM can actually set up parameters on which URL that need to be used for writing and other URL for reading?

In cloud services, many support like a Write or Read Only Node.
Can IDM set up parameters on which URL to be used for writing and other URL for reading?

so we can set parameters on IDM to which use of all writing which database that you that can be accessed and read can set another URL?

You could setup two separate connectors. Mapping is unidirectional so you would be using two mappings anyways.
A scripted connector could be a way as well:
https://backstage.forgerock.com/docs/idm/7.2/connector-dev-guide/groovy-connectors.html