"We will implement what we want and what we do not want," he said. "No one can impose upon us - neither the UN Security Council nor the African Union Peace and Security Council."
He was referring to a UN Security Council resolution on May 2 that called for Sudan and South Sudan to cease hostilities along their border. It also urged them to settle unresolved issues that persist after the South's separation last July, following a 1983-2005 civil war.
Mr Al Bashir's comments, his first about the resolution, came a day after Sudan's army said it had fought with South Sudan along the disputed border on Wednesday,
The South said it came under renewed Sudanese air attack, violating a UN-imposed ceasefire just four days ago.
The UN resolution also ordered Sudan and South Sudan to pull troops back from their disputed frontier on Wednesday, but Khartoum said it could not comply until there was a border agreement.
Mr Al Bashir was speaking to about 1000 oil industry workers, marking the "liberation" last month of Sudan's main oil region of Heglig. It had been occupied by South Sudan for 10 days in a move coinciding with waves of Sudanese air raids against the South.